工程文件修改后Tomcat容器重启问题

工程文件修改后Tomcat容器重启问题

在Eclipse中部署工程之Tomcat容器中,若代码有改动,一不小心按了save,则Tomcat就会重启,对于较大的工程很不方便。

配置方法,Tomcat配置文件server.xml中,Context元素reloadable属性设置为false

<Context docBase="helloWeb" path="/helloWeb" reloadable="false"

Tomcat官网对该属性介绍:https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes

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.

如果该属性为true,Catalina会监视/WEB-INF/classes/与/WEB-INF/lib下的变化,如果有变化则重启web

一些其他的参考:

http://blog.knowsky.com/186994.htm

热部署 热加载 Debug模式

http://www.huihoo.org/apache/tomcat/

http://www.blogjava.net/wangxinsh55/archive/2011/05/31/351449.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值