AutoDeploy a WAR file found in a subfolder of appBase

会有一股神秘感。 提交于 2019-12-01 11:37:05

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> 

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!