network 发表于 2017-1-8 13:06:57

struts出现org.apache.struts.action.MESSAGE异常的解决

  使用struts的tag <bean:write name="xxx" property="xxx"></bean:write><bean:write>的时候,当对象的属性值为long的时候,会报出如下的错误:</bean:write>
java 代码

[*]org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE   
[*]    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)   

  查找了很多资料,解决的方法非常有意思,在struts-config.xml中添加如下的配置:
xml 代码

[*]<message-resources parameter="ApplicationResources"/>  


<message-resources parameter="ApplicationResources"></message-resources>
就可以啦!没想到struts还有这样奇怪的bug~~~
页: [1]
查看完整版本: struts出现org.apache.struts.action.MESSAGE异常的解决