What's the difference between GenericServlet and HttpServlet?
GenericServlet | HttpServlet |
---|---|
The GenericServlet is an abstract class that is extended by HttpServlet to provide HTTP protocol-specific methods. | An abstract class that simplifies writing HTTP servlets. It extends the GenericServlet base class and provides an framework for handling the HTTP protocol. |
The GenericServlet does not include protocol-specific methods for handling request parameters, cookies, sessions and setting response headers. | The HttpServlet subclass passes generic service method requests to the relevant doGet() or doPost() method. |
GenericServlet is not specific to any protocol. | HttpServlet only supports HTTP and HTTPS protocol. |
No comments:
Post a Comment