Reputation: 2861
I have multiple war files to deploy, for example. coll.war
, egg.war
, etc., each one will specify an application module.
In our application I have some specification that coll.war
should deploy first and rest has to deploy in specific sequence such like.
Can somebody help me out to do it.
Upvotes: 6
Views: 2494
Reputation: 10109
In server.xml inside servers folders it will add a entry for every war you added.Delete those entries.
Then create the xml files which have the following content and name the xml files in order inside the conf\Catalina{server_name} folder.
Example :
coll.xml
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="${catalina.home}/deploy/collWAR" crossContext="true">
</Context>
Upvotes: 1
Reputation: 48087
see the answer for tomcat6. Part of the answer is that not even the servlet spec specifies an order. Also, it contains various pointers on how to solve the problem in different ways than through application-server-based deployment order
I am not aware that anything in tomcat7 changed the assumptions, so that the linked answer should be sufficient, even if you're on tomcat7, not tomcat6
To make it more explicit, promoting a comment into the answer:
That answer wouldn't help you do what you're asking (because it explicitly states that tomcat is not providing this option), but it links to the tomcat wiki with workarounds, mentions different solutions to the problem with Zeroconf, etc.. This means that your underlying problem with inter-dependent WAR files can be solved, just not necessarily by specifying app-server's deployment order.
Upvotes: 0