Tomcat context management

后端 未结 2 1712
我在风中等你
我在风中等你 2021-02-04 16:55

The tomcat 6.0 document at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html says:

Only if a context file does not exist for the application in

2条回答
  •  甜味超标
    2021-02-04 17:11

    I agree that the documentation is misleading. Normally, this behaviour is actually welcomed since when you deploy a new version of your application, you want to have your updated context.xml file deployed as well. If you plan on editing your context.xml file manually on your production server, I suggest skip it altogether and copy its content to conf/server.xml file.

    A quick patch/solution to your problem (wouldn't do it myself) is to mark the context.xml file as readonly after it has been deployed and updated the first time. This way Tomcat cannot delete/update it.

提交回复
热议问题