Cannot find message resources under key org.apache.struts.action.MESSAGE

 

新建个项目,显示long类型字段的时候报错:Cannot find message resources under key org.apache.struts.action.MESSAGE

 

下面方法可以解决:

 

在struts-config.xml中添加如下的配置:

<message-resources parameter="ApplicationResources"/>  
 
 
 
如果出现“Cannot find message resources under key org.apache.struts.action.MESSAGE”,是说明未找到ApplicationResources.properties,要注意三方面设置。  
  第一:在web.xml适当位置要有如下设置:  

<init-param>  
    <param-name>application</param-name>  
    <param-value>ApplicationResources</param-value>  
</init-param> 

  第二:在struts-config.xml中适当位置要有如下设置:  

<message-resources parameter="ApplicationResources"/> 

  第三:确保ApplicationResources.properties文件在你建立的WEB-INF\classes目录中,而且其中有关于index.title的设置(当然,以你要提取的key名称为准)。  

  另外说明,你也能把ApplicationResources.properties放到classes目录下其他目录,同时修改struts-config.xml中的对应设置。例如:  
 将“ApplicationResources.properties”放入WEB-INF\classes\test目录下。struts-config.xml中的对应设置:  

<message-resources parameter="test/ApplicationResources"/>

 

原文地址:http://blog.csdn.net/huaitao/article/details/3503803

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值