如何使用struts2标签获取properties资源文件里面的值
在struts.xml里加入:<constant name="struts.custom.i18n.resources" value="ssh"/>value是指的你的properties文件的名字,例如ssh.properties 。
在页面上:
<s:property value="%{getText('test')}"/>
这样提取就可以了,'test'是指的你在properties里的key值 。
页:
[1]