Cannot find message resources under key org.apache.struts.action.MESSAGE
来源:互联网 发布:阿里云看我的订单 编辑:程序博客网 时间:2024/06/16 00:00
Struts时遇到的问题:
运行程序出现Cannot find message resources under key org.apache.struts.action.MESSAGE错误,是说明找不到ApplicationResources.properties,要注意以下四方面。
第一:在web.xml文件<web-app> <servlet>"把下面的内容放在这里"</servlet></web-app>中加入
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
第二:在struts-config.xml中加入如下设置:
<message-resources parameter="ApplicationResources"/>
该设置最好放在:</action-mappings>"放到这里"</struts-config>
第三:确保ApplicationResources.properties文件在你建立的WEB-INF\classes文件夹中。
可以把applicationResources.properties放到classes文件夹下其它目录,例如:
把ApplicationResources.properties放入WEB-INF\classes\mydir文件夹下。struts-config.xml中的设置必须改
<message-resources parameter="mydir/ApplicationResources"/>
第四:就可能是键值的问题,struts的资源文件也是可以分多资源文件配置的,比如配备是这样的
<message-resources parameter="ApplicationResources" key="myAppRes"/>
如果只有一个带key的资源文件,那就会抛出 org.apache.struts.action.MESSAGE错误了,删除key即可。
文章来源于:http://www.cnblogs.com/tjsquall/archive/2008/11/27/1342258.html
- Struts Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE的错误
- cannot find message resources under key org.apache.struts.action.message 问题解决
- 解决:Cannot find message resources under key org.apache.struts.action.MESSAGE的 方法
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- 时出现Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action...
- 在做成绩查询时出现Cannot find message resources under key org.apache.struts.action.MESSAGE
- 新建个项目,显示long类型字段的时候报错:Cannot find message resources under key org.apache.struts.action.MESSAGE
- 使用struts的tag ,当对象的属性值为long的时候:org.apache.jasper.JasperException: Cannot find message resources under
- Struts Message Resources
- Protobuf中的变长编码:Varints
- 【js学习笔记-045】-- 类对象数组
- 多校第一场——hdu4604——dp
- 【js学习笔记-046】-- 函数
- android音乐文件乱码显示问题解决
- Cannot find message resources under key org.apache.struts.action.MESSAGE
- unity3d for Android实现欢迎引导页面的功能
- JAVA 多线程
- SQLite
- [Cocos2D-X]在windows8下:VS2012+Cocos2D-X-2.1.4+cygwin创建win32项目
- wikioi1501 二叉树最大宽度和高度
- Cocos2d-x游戏开发之Cocos2dx通过JNI调用Android的Java代码(webView实例)
- android的库引用
- (文档翻译)Ext.data.Model