Tomcat context management

后端 未结 2 1677
我在风中等你
我在风中等你 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.

    0 讨论(0)
  • 2021-02-04 17:21

    If you want to avoid overwriting of 'context.xml', you could go to Tomcat Manager url and then uninstall the previous app and install the new war/ear. This way you have more control on the installation process.

    0 讨论(0)
提交回复
热议问题