struts2 设置了<constant name="struts.devMode" value="true"></constant> 还是不起作用

在默认配置文件default.properties中,有这样一段配置描述


### when set to true, Struts will act much more friendly for developers. This
### includes:
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
### - raising various debug or ignorable problems to errors
###   For example: normally a request to foo.action?someUnknownField=true should
###                be ignored (given that any value can come from the web and it
###                should not be trusted). However, during development, it may be
###                useful to know when these errors are happening and be told of
###                them right away.
struts.devMode = false

如果设置struts.decMode = true,那以上几个开发者模式都是true,首先还是要考虑你是否 复制的时候多了空格。然后参考:

<constant name="struts.devMode" value="true" />
改成
<constant name="struts.configuration.xml.reload" value="true"/>
有人说是因为tomcat加了空格的问题,具体不清楚。
下面是4个开发模式常用配置的简介---
    <!-- 开启使用开发模式,详细错误提示 -->
    <!-- <constant name="struts.devMode" value="true"/>-->
    <!-- 指定每次请求到达,重新加载资源文件 -->
    <!-- <constant name="struts.i18n.reload" value="true"/>-->
    <!-- 指定每次配置文件更改后,自动重新加载 -->
    <!-- <constant name="struts.configuration.xml.reload" value="true"/>-->
    <!-- 指定XSLT Result使用样式表缓存 -->

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值