This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes <load-on-startup> Tag in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "<load-on-startup> Tag in web.xml" Watch "<load-on-startup> Tag in web.xml" New topic
Author

<load-on-startup> Tag in web.xml

Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 145

Hi All ,

Can anyone suggest what will happen if i am giving value 0 or negative or empty .What will be the loading sequence.



Have a great day.....


Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

From the XML Schema description:
The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. 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.


[My Blog]
All roads lead to JavaRanch
Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 145

Thanks Christopher ....Have a great day
 
Consider Paul's rocket mass heater.
 
subject: <load-on-startup> Tag in web.xml
 
Similar Threads
Unregistered?
World Market
WA #2 ..... word association
I Always Wanna Post Java Related Topics
Software Life