Servlet Life Cycle
Servlet is managed by the servlet container, the container manages the entire lifecycle of the servlet. When the servlet container startup, it will initialize several servlet instances, at this time the servlet init() method will be invoked. When the servlet container receives an HTTP request, it will execute the servlet’s service() method, and when the …