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 do you mean by web applications? Explain web application directory arrangement?
What is the difference between 2 types of servlets?
Difference between httpservlet and generic servlets?
What is the
How can we perform any action at the time of deploying the project?
What is the directory structure of a war file?
What is cookie? Why is cookie used?
What is the difference between servlet and filter?
What is the difference between get and post methods?
How can we create deadlock situation in servlet?
How can you create a session in servlet?
What are the types of protocols supported by httpservlet ?
Explain web application directory arrangement?
What is the difference between jsp and servlet life cycle?
How is a servlet implemented in code?