life cycle of servlet
Sigiloso
The Web container loads the servlet class and creates one or more instances of the servlet class. The Web container invokes init() method of the servlet instance during initialization of the servlet. The init() method is invoked only once in the servlet life cycle. The Web container invokes the service() method to allow a servlet to process a client request. The service() method processes the request and returns the response back to the Web container. The servlet then waits to receive and process subsequent requests. The Web container calls the destroy() method before removing the servlet instance from the service. The destroy() method is also invoked only once in a servlet life cycle.