You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Mackenzie <ma...@berbee.com> on 2002/03/13 22:10:44 UTC

load-on-startup

Greetings.

         Tomcat 4.0.2 load-on-startup in web.xml

         I have two servlets, the first one I gave a value of 0 to the 
load-on-startup element and the second servlet I gave a value of 5.

         The Servlet 2.3 API Deployment Descriptor(web.xml) DTD talks about 
load-on-startup. From the description in the DTD
-----------------snip---------------------
If the value is a positive integer or 0, the container must load and 
initialize the servlet as the
application is deployed. The container must guarantee that servlets marked 
with lower
integers are loaded before servlets marked with higher integers. The 
container may choose the order
of loading of servlets with the same load-on-start-up value.
-----------------snip---------------------

 From my reading of this entry I figured that the first servlet, with 
load-on-startup=0, would be completely loaded AND initialized before the 
second servlet could be loaded. Seeing as the second servlet has 
load-on-startup=5

I made these entries for the webapp because I have code in the init() 
method of the first servlet that must load before the second servlet is 
loaded and inititialized, so that the second servlet(and possibly other 
servlets) could use the results from the first servlets initialization.

If I remove the load-on-startup for the second servlet then all seems.

So bottom line, is this a bug or designed operation?


Cheers Mark


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>