Question:

Explain the life cycle of a Servlet.

Answer:

On every client’s request, the Servlet Engine loads the servlets and invokes its init methods, in order for the servlet to be initialized. Then, the Servlet object handles all subsequent requests coming from that client, by invoking the service method for each request separately. Finally, the servlet is removed by calling the server’s destroy method.


Keywords:

© 2017 QuizBucket.org