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 Struts and the fly likes Struts 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 » Frameworks » Struts
Bookmark "Struts" Watch "Struts" New topic


Paul Arockiaraj

Joined: Feb 17, 2006
Posts: 7
Hi friends,

In web.xml there is one tag <load-on-startup>1</load-on-startup>. ok

i suppose to give <load-on-startup>100</load-on-startup>.

what will happen.

please give the suggestion.

thank you...
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am pretty sure this is just a yes or no option where 1 = yes and 0 = no. What are you trying to accomplish?

- Brent
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The Web container uses this number to determine the order in which to load servlets. If a <load-on-startup> tag is not specified, the servlet will not be loaded on startup. If only one servlet has a <load-on-startup> it doesn't matter what number appears: it will simply be loaded. If more than one servlet has a <load-on-startup>, the web container will load them in order from the lowest number to the highest.

So, in answer to your question: If servlet A has a value of 1 in <load-on-startup> and servlet B has a value of 100, all it means is that servlet B will be loaded after servlet A.

Consultant, Sima Solutions
Paul Arockiaraj

Joined: Feb 17, 2006
Posts: 7
Dear Merrill Higginson,

I think i got the exact answer.

Thank you very much.

Yours luv
I agree. Here's the link:
subject: Struts
Similar Threads
How to create servlet object immediately when we start server
Deploy struts app
pre compilation of JSP file
servlet start up on server initialization
reduce the time for converting JSP into servlet