Question:What are the parameters for service method ?
Answer
Most of the servlets are written by extending the HttpServlet class and override the HttpServlet's service() method. This method takes two parameters :
* HttpServletRequest, and
* HttpServletResponse.
HttpServlet class extends the GenericServlet and override the service() method of GenericServlet class, which takes two parameters :
* ServletRequest, and
* ServletResponse.
HttpServletRequest interface extends the ServletRequest interface and HttpServletResponse extends ServletResponse interface.