GenericServlet:它实现了两接口Servlet和ServletConfig.它实现了Servlet接口中除service()方法外的其他4个方法。To writea generic servlet, you need only override the abstract service method.
HttpServlet:它继承自GenericServletA subclass ofHttpServlet must override at least one method, usually one of these:
· doGet, if the servletsupports HTTP GET requests
· doPost, for HTTP POSTrequests
· doPut, for HTTP PUTrequests
· doDelete, for HTTPDELETE requests
· init and destroy, to manageresources that are held for the life of the servlet
· getServletInfo, whichthe servlet uses to provide information about itself
service handles standard HTTP requests bydispatching them to the handler methods for each HTTP request type (the doXXXmethods listed above).