Struts2基础(八):Struts2国际化

其实我们在Struts2基础(七):防止表单重复提交时对错误信息的处理已经用过国际化了

jsp:

           <s:text name="item.username">

struts2配置文件:

           <constant name="struts.custom.i18n.resource" value="路径"></constant>

在对应路径下简历资源文件:

           (1).resource.properties

           (2).resource_en_US.properties

           (3).resource_zh_CN.properties

在对应的properties中写相应的key和value

猜你喜欢

转载自blog.csdn.net/qq_40594696/article/details/86601060
今日推荐