permaculture playing cards*
The moose likes Servlets and the fly likes What does -1 singnify in load-on-startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What does -1 singnify in load-on-startup" Watch "What does -1 singnify in load-on-startup" New topic
Author

What does -1 singnify in load-on-startup

Bob Mathews
Ranch Hand

Joined: Feb 26, 2006
Posts: 43
What is the meaning of <load-on-startup>-1</load-on-startup>?
What does -1 signify in this?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses.


[My Blog]
All roads lead to JavaRanch
Bob Mathews
Ranch Hand

Joined: Feb 26, 2006
Posts: 43
What if the value is 0?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.

This is all in the Servlet Specification.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Perhaps you should read the Servlet Specification rather than having Satou do it for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does -1 singnify in load-on-startup
 
Similar Threads
How to create servlet object immediately when we start server
Struts
Load on Startup
Static Initialization Block
servlet start up on server initialization