When a servlet accepts a call from a client, it receives two objects. What are they?

ServeltRequest: which encapsulates the communication from the client to the server.ServletResponse: which encapsulates the communication from the servlet back to the client.ServletRequest and ServletResponse are interfaces defined by the javax.servlet package.

Showing Answers 1 - 4 of 4 Answers

Gunna

  • Aug 10th, 2006
 

The Servlet then receives "ServletResponse" and "ServletRequest" objects.

  Was this answer useful?  Yes

rameshvdnv

  • Apr 25th, 2007
 

when a request is sent from the browser to a servlet, the servlet object will be created by the webcontainer if we don't provide load-on-startup element.suppose if we provide load-on-startup element the webcontainer creates the servlet object when the webapplication is started.Anyway after the servletobject is created ,the webcontainer executes the service method of the servlet by passing the request and response objects which was created when the client send a request for a servlet.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions