是否可以在不重启 Tomcat 的情况下重新加载 server.xml 中的更改?
我想在许多服务器上对我的 access_log 格式(在 org.apache.catalina.valves.AccessLogValve -> pattern='...' 中)做几处更改,但我不想每次更改都重新启动我的 Tomcat在 server.xml 中。是否可以让 Tomcat 在不重启的情况下重新加载模式中的配置更改?
(Tomcat 7.0.29)
最佳答案
恐怕答案是“不”。每Defining a context在 Tomcat 7 文档中:
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.
那里有很多粗体文字。他们肯定是认真的。
关于无需重启即可重新加载 Tomcat AccessLogValve 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16055030/