This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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.
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.