Extend the set of reloadable directories on tomcat
I would like to extend the set of reloadable directories on tomcat 7.0.59. When reloadable attribute within Context
is set to true, tomcat monitors classes in: /WEB-INF/classes/
and /WEB-INF/lib
.
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
Entire system is divided into modules, each module can have its own web context ( /WEB-INF/classes/
) and/or extend the global context ( /classes/
). Let's say that I'd like to have /classes/
directory reloadable. How can I achieve that?
I tried using WatchedResource
tag, without effect:
<Context reloadable="true" path="/test" docBase="/MY_MODULE/web/webroot">
<Manager pathname="" />
<WatchedResource>/MY_MODULE/classes</WatchedResource>
</Context>
You can try starting tomcat with HotSwapAgent: Plugin_tomcat. (GITHUB HotswapProjects)
You can have a differrent hotswap-agent.properties
file on each of your modules, to load differrent classpaths.
上一篇: 中文URL在Edge中正确加载,但不在其他浏览器中加载
下一篇: 在tomcat上扩展可重载目录集