Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is life cycle of servlet?
A web container manages the life cycle of the servlet :

  * Loading and Inatantiation: container load the servlet class at the first request to that servlet. The loading of the servlet depends on the attribute <load-on-startup> of web.xml file. Instantiation is done by calling the default constructor.
  * Initialization: calling the init() method.
  * Servicing the Request: calling the service() method and pass the HttpServletRequest and HttpServletResponse object as the parameters.
  * Destroying the Servlet: calling the destroy() method.
Posted By: Name:Rajesh Kr URL: What is life cycle of servlet?