No message resources found for bundle: org.apache.struts.action.MESSAGE

一束光丫. 2009-10-05 07:00:18
struts-config.xml配置

<form-bean name="deptForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="dept" type="com.cowry.entity.Dept" />
</form-bean>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>


validation.xml配置

<form name="deptForm">
<field property="dept.deptId" depends="integer">
<arg key="dept.deptId" bundle="IANGUAGE"/>
</field>
<field property="dept.deptName" depends="required">
<arg key="dept.deptName" bundle="IANGUAGE"/>
</field>
</form>


language_en_US.properties
language_zh_CN.properties

----------两个资源文件的路径没有问题

页面代码
<html:form action="/dept?param=doSave" method="post" onsubmit="return validateDeptForm(this);">
<ul>
<li>
<bean:message key="dept.deptId" bundle="IANGUAGE" />
:
<html:text property="dept.deptId" value=""/>
<html:errors property="dept.deptId" bundle="IANGUAGE" />
</li>
<li>
<bean:message key="dept.deptName" bundle="IANGUAGE" />
:
<html:text property="dept.deptName" />
<html:errors property="dept.deptName" bundle="IANGUAGE" />
</li>
<li>
<html:submit>
<bean:message key="submit" bundle="IANGUAGE" />
</html:submit>
</li>
</ul>
</html:form>


No message resources found for bundle: org.apache.struts.action.MESSAGE
帮助看一下。哪里出错了。
...全文
140 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
一束光丫. 2009-10-06
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 samdn 的回复:]
<message-resources parameter="" />这个标签有配置吗
[/Quote]


<message-resources key="IANGUAGE" parameter="com.cowry.language.language"/>
samdn 2009-10-05
  • 打赏
  • 举报
回复
<message-resources parameter="" />这个标签有配置吗
一束光丫. 2009-10-05
  • 打赏
  • 举报
回复
没人进来。自己顶顶!

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧