The Web container is used for managing the servlet's life cycle. The Web container produces an instance of the servlet and then the container invokes the init() function. At the completion of the init() function the servlet is in ready state to service givens from clients. The container invokes the servlet's service() function for handling each request by spawning a new thread for each and every request from the Web container's thread pool. Before deleting the instance the container will call the destroy() function. After destroy() the servlet converts the potential candidate for garbage collection.