Sunday, October 22, 2017

HttpServlet

As most servlet is written to handle request delivered by http protocol, the HttpServlet extends the GenericServlet and provide methods specially created to handle http requests.

HttpServlet defines doGet and doPut methods which can be overridden by the real servlet to process the request.  doGet and doPut eventually returns to the Servlet service method.  There are more "do" methods for the other http request types such as "head" etc.

HttpServlet also defines 2 new objects, httpRequest and httpResponse to be used in place of the ServletRequest and ServletResponse objects.

No comments: