Question:
When a servlet accepts a call from a client, it receives two objects. What are they?
Answer:
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. Source: CoolInterview.com
After developing the Web application when you install in the server, immediately container creates ServletContext object and later it creates Servlet object and before calling init() container calls default constructor of servlet and creates ServletConfig Object and stores in to init() of ServletConfig sc parameter and later executes service(). ----------------------------------
1>Session Object 2>Request Object Source: CoolInterview.com
Answered by: venkateswara reddy gunapati | Date: 6/7/2010
| Contact venkateswara reddy gunapati
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|