This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Without a <load-on-startup> configuration setting, the servlet is created the first time it is requested. If your Servlet initialization is resource intensive (say if it needs to create a large number of support objects) then the first user/client to access that Servlet will experience a delay. In such cases, you should use the <load-on-startup>. You only need to define a number -- such as <load-on-startup>1</load-on-startup> -- if the initialization order of your Servlets is important. If not, you can simply use <load-on-startup/>. [ June 03, 2004: Message edited by: Mark Vedder ]
Following are the exact words picked from Servlet 2.3 specification "The servlet container is responsible for loading and instantiating servlets. The loading and instantiation can occur when the container is started, or delayed until the container determines the servlet is needed to service a request.".