0

I am trying to do some deployment sequencing with my webapps.

I looked at this thread on StackOverflow: Is there a way to enforce a deployment order in tomcat6?

And tried to replicate it.

What I did was add four XML files in my C:\apache-tomcat-9.0.45\conf\Catalina\localhost\ folder. Named webAppName.xml. For example, I created pcc.xml like so:

<Context docBase="pcc.war"/>

I did something similat for my other three webapps.

Then in my server.xml I did this:

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    
    <Context path="/pcc" docBase="pcc.war"/>
    <Context path="/GAC" docBase="GAC.war"/>
    <Context path="/GTC" docBase="GTC.war"/>
    <Context path="/LOG" docBase="LOG.war"/>
    
</Host>

I want my webapps to be deployed in this order. But when I start my server, GAC starts before pcc.

But when I do:

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    
    <Context path="/pcc" docBase="pcc.war"/>
    <!--Context path="/DAC" docBase="DAC.war"/>
    <Context path="/ATC" docBase="ATC.war"/>
    <Context path="/LOG" docBase="LOG.war"/-->
    
</Host>

pcc.war is the first to deploy. Can anyone tell me what am I doing wrong. I thought I followed the instructions to the tee, or maybe I didn't understand the solution fully. Any help would be appreciated. Thanks!!

hell_storm2004
  • 1,029
  • 2
  • 18
  • 45

0 Answers0