What is the servlet life cycle?

Each servlet has the same life cycle:A server loads and initializes the servlet (init())The servlet handles zero or more client requests (service())The server removes the servlet (destroy()) (some servers do this step only when they shut down)

Showing Answers 1 - 3 of 3 Answers

Every servlet follows the same cycle

*The servlet is initialized by calling the init () method.
*The servlet calls service() method to process a clients request.
*The servlet is terminated by calling the destroy() method.
*Finally, servlet is garbage collected by the garbage collector of the JVM.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions