File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes can i override the service()? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "can i override the service()?" Watch "can i override the service()?" New topic

can i override the service()?

ajay verma
Ranch Hand

Joined: Dec 10, 2007
Posts: 37
what is the use of overriding service() in servlet?
what all methods you can override in place of service() method?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You can override it but you shouldn't do so unless you have a real good reason.

As for your second question, see my reply to you other post:
It applies here as well.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Overriding the service method is discussed in more detail in the
I agree. Here's the link:
subject: can i override the service()?
It's not a secret anymore!