<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application --><Context>
这个文件的内容会被每一个web应用加载;
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
默认的监控资源的集合,如果以下任意一个改变了,web 应用将重新加载
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
取消注释以禁用Tomcat重启时session会话的持久性
<!-- <Manager pathname="" /> -->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
取消注释以启动Comet(彗星)连接(提供session会话到期及webapp声明周期的事件)
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>
这里,我们可以看到监控的资源是:WEB-INF/web.xml和${catalina.base}/conf/web.xml这两个文件;所以,只要Tomcat监控的WEB-INF目录下的web.xml和catalina配置路径下面,conf目录下的web.xm文件变化了,Tomcat就会重新加载;