Do you mean that you wish to know what happens in servlet life cycle?
When the application is accessed using a URL, the URL will be pointing to a particular servlet.That particular servlet will then be loaded and life cycle occurs. The mapping between the URL and the servlet is available in deployment descriptor of the application, in our case web.xml.
The init() of the servlet is called and then the service() is called. The service() then calls the doGet() or doPost() accordingly, in case of a HttpServlet.
I would seriously suggest you read the Chapter 4 of Head First Servlets & JSPs.
Usually servlet is loaded when the request is received for a servlet which is not loaded yet. you can make the container load the servlets at the server startup by specifying load-on-startup parameter in web.xml
1) Container loads all the servlet with load-on-startup param when server starts
2. When ever any request is received, based on URL patters, container determines if the request is to be handled by a servlet.
3. If request is to be handled by a servlet, container checks if servlet is already loaded and initialized, if so handover the request to it.
3. If servlet is not loaded,container creates a new instance of the servlet, initializes it by calling its init() method. Once servlet is initialize, handover the request to that servlet.
Fore more info, google for 'servlet lifecycle' [ May 05, 2008: Message edited by: sudhir nim ]