What is the use of service(ServletRequest, ServletResponse) method in HttpServlet ?
This can actually be found in the API:
Dispatches client requests to the protected service method.
The service(ServletRequest, ServletResponse) method of the GenericServlet class is an abstract method, so it has to be implemented by the first concrete class in the hierarchy (down the tree). For the HTTP protocol this is done in the HttpServlet class. All the client requests are directed to the public service(ServletRequest, ServletResponse) method, which dispatches them to the protected service(HttpServletRequest, HttpServletResponse) method from the HttpServlet which dispatches them to the doXXX methods defined in the HttpServlet.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads