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
How can we upload the file to the server using servlet?
What is cgi and what are its drawbacks?
How does tomcat servlet container work?
What is servlet interface?
What’s the use of the servlet wrapper classes??
How can we invoke another servlet in a different application?
What are different ways for authentication of servlet?
What is context in servlet?
What are the benefits of using servlet over cgi?
What is http servlet in java?
Which method of the httpservletrequest object is used?
What is a servlet?
What are the different session tracking techniques?
What is the workflow of a servlet?
Explain the lifecycle of a servlet?