...
There is no expected startup order. Neither the Servlet spec nor Tomcat define one. You can't rely on the apps starting in any particular order.
While the above statement is certainly true, there is a potential "workaround":
If you actually have two (or more) apps depending on each other, you may decided to start multiple services in you server.xml:
No Format |
---|
<Service name="Webapps1">
<Connector .../>
<Engine ...>
<Host appbase="webapps1" ...>
...
</Host>
</Engine>
</Service>
<Service name="Webapps2">
<Connector .../>
<Engine ...>
<Host appbase="webapps2" ...>
...
</Host>
</Engine>
</Service>
|
I.e. you split the regular "/webapps" directory into "/webapp21" and "/webapps2", whereas everything in the former is deployed and started before the later. The drawback is that you need separate ports for the services.
Anchor | ||||
---|---|---|---|---|
|
...