how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..
Answer Posted / suraj kumar
The servlet is controlled by the container in which the servlet has been deployed. When a request is made to a servlet, its mapping is searched in web.xml. If mapping found then the container performs the following steps.
a.If an instance of the servlet does not exist, the Web container loads the servlet class.
b.Creates an instance of the servlet class.
c.Initializes the servlet instance by calling the init method
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are the benefits of using servlet over cgi?
Explain the steps involved in placing a servlet within a package?
Write a program to show the functionality of servlets.
What is preinitialization of a servlet?
What is servlet container. how it works?
How to get the IP address of client in servlet?
Given the request path below, which are context path, servlet path and path info?
Why are servlets used?
What is the process for chaining servlet?
how many jsp scripting elements are there and what are those?
What are common tasks performed by Servlet Container?
What is meant by servlet? What are the parameters of the service method?
Why do we use sendredirect() method?
What is cookies in servlet with example?
What is cgi and what are its drawbacks?