I know that Tomcat and the Servlet spec do not support starting webapps in a particular order.
However, this seems to me like a common use case, and I\'m wondering i
That's quite easy to achieve if you don't care hacking a bit of tomcat code and creating your own Host instance
1) Create a subClass of org.apache.catalina.core.StandardHost, say MyHost:
class MyHost extends org.apache.catalina.core.StandardHost{
public MyHost (){
super();
//changing HashMap for a predictable ordered Map :)
this.children = new LinkedHashMap();
}
}
2) register your class on your server's xml Host tag ()
Incredible as it may seem, it solves the problem as long as you have all your web app declared in the correct order inside of Host tag:
Thaen app1 will start before app2, no matter which SO you used.