The Servlet Life Cycle

These are the life cycle phases of a Servlet:
  1. Load the servlet class.
  2. Create an instance of the servlet.
  3. Call the servlet's init() method.
  4. Call the servlet's service() method for each request. Repeat indefinitely. Multiple threads may call concurrently!
  5. Call the servlet's destroy() method.
  6. Unload the class.
If, on receiving a request, Tomcat discovers
that the servlet's class file has changed, it
  1. Calls the old servlet's destroy() method,
  2. Unloads the old class, and
  3. Starts a new servlet life cycle (step 1. above).