Deploy a web application other than the webapp folder in apache tomcat

I want to deploy a web application in a directory (e.g. \ Users \ username \ myapps \ app1), except for the webapps folder.

I know how to change "appBase" other than webapps by setting the "appBase" attribute in the "host" tag in the server.xml file in the conf directory.

But the problem is that I do not want to change the entire webapps directory, I just want to deploy one application not in the webapps directory.

+4
source share
1 answer

Use the file context.xmllocated in the directory $CATALINA_BASE/conf/[enginename]/[hostname]/.

  • enginenameserver.xml- Server/Service/ Engine[@name]The default value Catalina.
  • hostnameserver.xml- Server/Service/Engine Host[@name]The default value localhost.

docBase.

<Context docBase="/Users/username/myapps/app1">
</Context>

. http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

PS ( tomcat):

server.xml. , , conf/server.xml Tomcat.

+6

All Articles