struts2 set struts.devMode to false to disable this message

本文介绍了Struts2框架中的开发模式设置,特别是在调试大型表单时如何通过启用开发模式来提高错误可见性。文章还提供了如何在struts.xml文件中配置开发模式以避免不必要的警告信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

see http://struts.apache.org/release/2.2.x/docs/devmode.html

 

  • And thirdly, perhaps the setting which is less widely known, and therefore a source of much confusion: it will raise the level of debug or normally ignorable problems to errors. For example: when you submit a field which cannot be set on an action 'someUnknownField', it will normally be ignored. However, when you're in development mode, an exception will be thrown, telling you an invalid field was submitted. This is very useful for debugging or testing large forms, but can also be confusing if you're relying on parameters in your request that are not set on the action, but which you are using directly in your view layer (warning: bad practice, you should always validate input from the web).

     

     

    这个其实不影响,只是开发模式设置的,你可以在struts.xml设置

    <constant name="struts.devMode" value="false“/>

    就可以屏蔽掉了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值