AutoDeploy a WAR file found in a subfolder of appBase

前端 未结 2 566
甜味超标
甜味超标 2021-01-14 19:39

I have a third party web application which I would like to deploy to a Tomcat 5.0 server via an installer. AutoDeploy is set to true. However, the application consists of mo

相关标签:
2条回答
  • 2021-01-14 20:06

    Knowing the question is years old, now answering for Tomcat 8.5 here.

    You can change the name of your .war like this: myapp#app1.war

    After you place this .war in webapps, Tomcat to deploy your application in webapps/myapp/app1.

    0 讨论(0)
  • 2021-01-14 20:21

    As this page suggests, you can place two XML files into $CATALINA_HOME/conf/[engine_name]/[host_name] directory (e.g. $CATALINA_HOME/conf/Catalina/localhost) each defining a Context for one of two WARs.

    First one (e.g. app1context.xml):

    <Context path="/myapp/app1" docBase="${catalina.home}/webapps/myapp/app1war">
    
    </Context> 
    

    And the second one (e.g. app2context.xml):

    <Context path="/myapp/app2" docBase="${catalina.home}/webapps/myapp/app2war">
    
    </Context> 
    
    0 讨论(0)
提交回复
热议问题