how this statement works..?
public void service(HttpServletRequest
request,HttpServletResponse response)

Answer Posted / sanjeev kumar

When ever a http client request is sumbitted servlet engine
will received this request and it identifies the proper
servlet to handle this request from web.xml and calls the
public service method of the perticular servlet. Internally
this public service will call the private service method
and private service method will call the doGet() or doPost
() method based on the client request. This public void
service(HttpServletRequest request, HttpServletResponse
response) will be called once per the request.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the methods of generated servlet?

887


What is dispatcher servlet?

788


Describe in brief RequestDespatcher?

827


What is the dispatcher servlet?

724


What's the difference between servlets and applets?

760


Elucidate servlet attributes and its scope?

754


What is the purpose of dispatcherservlet properties?

713


What is a servlet engine?

744


What are the jobs performed by servlets?

769


What is http servlet in java?

762


Why HttpServlet class is declared abstract?

855


What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?

827


What are the differences between the servletconfig interface and the servletcontext interface?

841


What is cgi?

781


What are important features of Servlet 3?

807