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
帮助看一下。哪里出错了。