Explain the different stages in the life cycle of a servlet
The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions

Use Me  ?

New searches
Java-10cs753-Downloadable-->View question

Explain the different stages in the life cycle of a servlet?

(6M) [Jan 2014, July 2013 , Jan 2015 ]


Taged users:

Be first to like this question

Talk about thisDelete|Like|Dislike|


Servlet Life Cycle The life cycle of a servlet is controlled by the container in which the servlet has been deployed. When a request is mapped to a servlet, the container performs the following steps.

1. If an instance of the servlet does not exist, the Web container

a. Loads the servlet class.

b. Creates an instance of the servlet class.

c. Initializes the servlet instance by calling the init method. Initialization is covered in Initializing a Servlet.

2. Invokes the service method, passing a request and response object. Service methods are discussed in the section Writing Service Methods. If the container needs to remove the servlet, it finalizes the servlet by calling the servlet's destroy method. Finalization is discussed in Finalizing a Servlet. 


Be first to like this answer

Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|

Can you help us to add better answer here? Please see this

Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!