gpt4 book ai didi

java - Tomcat 7 : avoid automatic restart when change context. xml

转载 作者:太空狗 更新时间:2023-10-29 22:57:46 25 4
gpt4 key购买 nike

当我编辑 Tomcat 7.0.34 的全局 conf/context.xml 时,服务器似乎自动重新启动。我想避免自动重启,服务器应该以“旧”配置运行,直到我手动重启它。

所以我的问题是:当我在 Tomcat 7.0.34 中更改全局 conf/context.xml 时如何避免自动重启?

最佳答案

根据 Automatic Application Deployment ,当检测到变化时,应用程序将被重新部署

Updating a context file will trigger an undeploy of the application with the removal of any associated work directory. Any current user sessions will not be persisted. The application will be redeployed the next time the auto deployer checks for changes.

要停止此功能,必须将 autodeploy 标志设置为 false:

This flag value indicates if Tomcat should check periodically for new or updated web applications while Tomcat is running. If true, Tomcat periodically checks the appBase and $CATALINA_BASE/conf/[engine_name]/[host_name] directories and deploys any new web applications or context XML descriptors found.

或者,您可以使用正则表达式设置 deployIgnore 标志,定义自动部署应忽略哪些应用程序

关于java - Tomcat 7 : avoid automatic restart when change context. xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14828296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com