In ServletAPI it is given for doGet,doPost .......methods that they are called via service method???What does this mean?When exactly service method is called?When request is made for a particular servlet?I am sorry if I have confused. Thanks Veena
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
The service method is called any time a HTTP request arrives at the server which is mapped to that servlet. The servlet container decodes each request, creates HttPRequest and HttpResponse objects and calls service. The service method examines the request, and chooses the correct one of doGet, doPost, doHead etc. to call. Does that make sense?
Thanks Frank.Actually super class's service method is called right?I mean the one in HttpServlet class? Thanks again. Veena.
Joined: Jan 07, 1999
In general, yes. All teh servlet container knows how to do is call the "service(HttpRequest, HttpResponse) method. By default, the one from HttpServlet is used, but if you override this method in your own servlet, that one will be called instead.