Tomcat mapping context via server.xml

后端 未结 4 1562
耶瑟儿~
耶瑟儿~ 2021-02-08 11:07

I created a war and deployed it to my $CATALINA_HOME/webapps folder just fine. Then I wanted to test configuring it to point to a war at an arbitrary location such as c:\\tmp\\

4条回答
  •  Happy的楠姐
    2021-02-08 11:37

    You'd better put the context configuration in an individual file at /META-INF/context.xml inside the application files.

    It is NOT recommended to place elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.

    You can check out more details in Tomcat7 document here: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context

提交回复
热议问题