File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes specifying context startup order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "specifying context startup order" Watch "specifying context startup order" New topic
Author

specifying context startup order

Dan Tenenbaum
Greenhorn

Joined: Apr 19, 2005
Posts: 6
This is a Tomcat 5.0x question.

I have a webapp which has a servlet that is set to load on startup. That servlet depends on another context (namely slide) being loaded already.

It used to work fine, and then it stopped working. The servlet would hang at the moment it tried to get a connection to the slide repository.

This is not proof that webapp startup order is the problem, but it is a strong indicator in that direction.

So...my question is: How can I specify the startup order of webapps?

This would not seem to be a rare problem, but I haven't found any solutions yet.

TIA
D
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I believe they are loaded in the order in which they are added to server.xml. However, if you wanted, you could add a line of debugging to each application and check the log file entry's timestamp to see which loaded first.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: specifying context startup order
 
Similar Threads
Bean initialization in spring
ServletContextListener and load-on-startup
Multiple Server Mappings (Spring)
How to run a servlet using Tomcat?
Is it possible to deploy two wars in the same context?