在struts.xml里<constant name="struts.custom.i18n.resources" value="test"/> 写上这个,value是指的你的properties文件的名字,在页面上<s:property value="%{getText('test')}"/>这样提取就可以了,'test'是指的你在properties里的key值
用struts2标签提取properties文件里的值
本文介绍如何在Struts框架中进行国际化配置。通过在struts.xml文件中定义常量指定资源文件名,并在页面中使用<s:property>标签提取对应文本。

被折叠的 条评论
为什么被折叠?



