servlet life cycle?

Answer Posted / giridhar gangapatnam

Life Cycle of Servlet:

1.Servlet Loading.
2.Servlet instantiation:
After Servlet instantiation and before calling init() method
ServletConfig object is created by Container.
3.Servlet initialization: At that time init() method is called.
4.Request processing:In this stage service() method is called
and at that time Request and Response objects are created by
Container.
5.Servlet deinstantiation:At this stage destroy() method
will be called.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of welcome-file-list?

580


Why servlet is faster than jsp?

576


What are the life cycle methods of the servlet?

590


Explain load on start-up and its importance?

607


Which protocol will be used by browser and servlet to communicate

586






How we can create war file in servlet?

672


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

587


what is multiple server?

1768


Can we get PrintWriter and ServletOutputStream both in a servlet?

667


What do you mean by annotations in servlet?

595


How can we create deadlock situation in servlet?

857


What are the steps that are required to handle the multi-threading?

603


How will two or three servlets interact or communicate with each other?

924


How do you design microservices?

631


What is the use of servlet wrapper classes?

677