修改代码后Tomcat自动加载的配置
环境:MyEclipse8.6+ Tomcat6.0.18在进行Web开发时,修改页面是不用重启Tomcat的,当修改Java代码或者配置文件时,如果没有进行配置,则需要重启。
现在介绍Tomcat自动加载的配置方法。
找到Tomcat的安装目录下的context.xml文件(一般在X:\Program files\Tomcat 6.0\conf\context.xml这个位置),修改成如下即可(就是加上reloadable="true"):
<Context reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>
页:
[1]