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.
I have a small doubt is that what is the actual need of the service method since we are not doing anything with that?? I mean, we only override doGet or doPost...so why do we actually need the service method even?? This may be a silly question but I could not refrain myself from asking it.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
So as per the faq says, "The only thing the service method does is examining the HTTP method, and based on that, dispatch the request to the various doXYZ methods" is the real purpose of service method!
"The only thing the service method does is examining the HTTP method, and based on that, dispatch the request to the various doXYZ methods"
This statement is only applicable to HttpServlet not for Generic Servlet. As HttpServlet is implemented for HTTP Protocol, where as if you want to implement a Servlet for SMTP or some other protocol you need a service method.