Tomcat改配置文件无须重启
1.默认配置在webapps目录下放test.war文件
在重启后,能自动解war包(unpackWARs),访问成功
2.配置属性
2.1 appBase
删除webapps下解压出来的文件夹,test,重启后,未解压test.war,说明appBase是指定解压路径用的
2.2 reloadable
http://www.mulesoft.com/tomcat-reload#context
When you define a Context as "reloadable", Catalina's default behavior is to watch its
classes, libraries, and web.xml configuration files for changes to trigger reload.
修改class文件,自动加载,不用重启,但是修改web.xml文件,没有立即生效
2.3 WatchedResource
在标签内加WEB-INF/web.xml
目的是监听这个文件,若修改则重新加这个站点
但是,不好用,通过另一种方式,在conf\Catalina\localhost,目录下建一个文件,名字随便,暂叫“text.xml”
WEB-INF/web.xml
由此,可以延伸,若干配置文件都可以这么做像
WEB-INF/log4j.properties
页:
[1]