File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Web application start order in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Web application start order in Tomcat" Watch "Web application start order in Tomcat" New topic

Web application start order in Tomcat

Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
I have several applications deployed in a tomcat 5.5 that depend on another application. The problem is that I can't make this one to be the first to start. I've been reading tomcat's documentation, searching google and the forum, and I only found a post on a mailing list saying that this can't be, done but it was a couple years old. Is there any way to specify the start order of the applications?

2B || !2B
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
On my own installation the order is alphabetical, although I'm not sure if that's incidental or not. I'm unaware of a way to change the order - a look at the source would tell for sure.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63542

Why the dependency? That's a really fragile setup.

I'd explore ways to remove the dependency, or at least to render startup order moot.

[Asking smart questions] [About Bear] [Books by Bear]
Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
You're right, It's fragile... I'm working on it, I was looking for a workaround to solve the problem in the meantime.... is there any?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

There isn't one.
This gets discussed every so often on the Tomcat mailing list.

The answer is alway the same, code your apps in such a way that one doesn't rely on another.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
subject: Web application start order in Tomcat
It's not a secret anymore!