The lifecycle of a servlet is controlled by the container in which the servlet has been deployed. When a request is mapped to a servlet, the container performs the following steps.
If an instance of the servlet does not exist, the web container:
a. Loads the servlet class
b. Creates an instance of the servlet class
c. Initializes the servlet instance by calling the init method (initialization is covered in Creating and Initializing a Servlet)
The container invokes the service method, passing request and response objects. Service methods are discussed in Writing Service Methods.
A 0 value on load-on-startup
means that point 1 is executed when a request comes to that servlet. Other values means that point 1 is executed at container startup.