This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This question doesn't make sense without seeing the piece of code you're talking about. Any particular servlet may or may not override that method (note that's called "service", not "Service"). It's true that almost all servlets do not need to override it, though. I noticed a writeup of this exact question at http://www.coderanch.com/how-to/java/ServletsFaq#overriding-service
Akhilesh Murthy wrote:Why is the Service() method in the servlet not overriden?
I think your question should be changed to "Why should not override servlet's service() method?"
Well, the default implementation of the service() method parses the HTTP method (GET, POST, PUT...) and calls the appropriate methods (doGet(), doPost(), doPut() ...) accordingly. If you override the service() method and do not handle all the HTTP methods correctly, there are chances that some kind of requests would not be served.
subject: Why is the Service() method in the servlet not overriden?