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

How to upload a file to the server using servlet?

533


What is webservlet?

536


What is servlet and how it works?

508


What is the difference between using getSession(true) and getSession(false) methods?

571


Servlet is pure java object or not?

719






What is httpservlet class?

542


Differentiate between get and post?

684


What is meant by session? Tell me something about httpsession class?

601


Explain the role of dispatcherservlet and contextloaderlistener.

607


What is the difference between a generic servlet and http servlet?

522


What is preinitialization of a servlet?

582


Which interface should be implemented by all servlets?

700


What do you mean by chaining in servlet?

576


Is servlet synchronized?

605


Difference between forward() method and sendredirect() method ?

584