Struts 2 - Unexpected Exception caught setting 'xx'

爱⌒轻易说出口 提交于 2019-11-28 14:21:29

You can control the process of parameters population by Struts2 via overriding interceptors in the action config.

<action name="timesheetprocess" class="com.App.Controller.Timesheet.Timeprocess"
            method="execute">
   <interceptor-ref name="defaultStack">
      <param name="params.excludeParams">.*</param>
   </interceptor-ref>
   <result name="success">Time.jsp</result>
</action>

There you modify the excludeParams property of the params interceptor to exclude all parameters from processing via OGNL.

You should not get any exception in this way, but make sure you have configured struts.devMode=false

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

It should remove unnecessary warnings from the output. If you still get any warnings or exceptions in the log, then you should configure your logging framework to suppress those warnings or errors from the output.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!