<constant name="struts.custom.i18n.resources" value="messages"></constant>
//常量的值是 资源文件的基本名称,
- //如果资源文件在src下面,直接写名称
- //如果资源文件在包里面,加上包路径 cn/itcast/message
this.getText(资源文件中的key);
<s:text name=资源文件中的key/>
//校验规则中
<message key=资源文件中的key></message>
<s:i18n name="cn.itcast.struts2.demo7.package">
<s:text name=资源文件中的key></s:text>
</s:i18n>
原文:http://www.cnblogs.com/ty850454/p/5156262.html