| Author |
in which interface or class the method service(request, response) is present?
|
Nagaraj Shivaklara
Ranch Hand
Joined: Dec 16, 2008
Posts: 72
|
|
Hi,
Please let me know in which interface or class method service(request,response) is present? i mean in generic servlet or httpservlet?
|
Thanks n Regards,
Nagaraj S K
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
Check the API.
|
[My Blog]
All roads lead to JavaRanch
|
 |
swapnel surade
Ranch Hand
Joined: Mar 05, 2009
Posts: 129
|
|
In GenericServlet there is service(req,res) method present
|
 |
Nilesh Miskin
Ranch Hand
Joined: Jun 17, 2010
Posts: 44
|
|
|
The service method & other servlet lifecycle methods come from the javax.servlet.Servlet interface. The javax.servlet.GenericServlet is the abstract class that implements Servlet interface. To write a generic servlet you only need to override the abstract service() method. However mostly we use javax.servlet.http.HttpServlet. Here you never override service() method. The default implementation of service() provided by this abstract class handles HTTP requests by dispatching them to the handler methods(doXXX() methods) for each HTTP request type. e.g.doGet() for a GET request.
|
Nilesh Miskin
|
 |
 |
|
|
subject: in which interface or class the method service(request, response) is present?
|
|
|