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 a servlet-to-servlet communcation?

648


Why filter is used in servlet?

526


Explain the different ways for servlet authentication?

532


Which application server is best for java?

560


Is it good idea to create servlet constructor?

744






What do you mean by the servlet chaining?

549


What is the difference between a generic servlet and http servlet?

524


What is servlet in tomcat?

559


Explain the custom jsp tags and the beans.

615


How the JSP file will be executed on the Server side?

644


What are the servlet events?

594


What mechanisms are used by a Servlet Container to maintain session information?

666


Is servlet a controller?

575


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

576


What's the servlet interface?

596