eclipse安装PropEdit插件可更方便地直接编辑properties文件,而无需使用native2ascii
location:http://propedit.sourceforge.jp/eclipse/updates/
stucts 国际化资源配置 分三种范围:全局范围<Package范围<Action范围
首先要在stucts.xml中指定资源文件的命名前缀(baseName)
<constant name="struts.custom.i18n.resources" value="mess"/>
完整文件:
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE struts PUBLIC
<span style="white-space:pre"> </span>"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
<span style="white-space:pre"> </span>"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<!-- 指定Struts 2配置文件的根元素 -->
<struts>
<span style="white-space:pre"> </span><!-- 指定全局国际化资源文件 -->
<span style="white-space:pre"> </span><constant name="struts.custom.i18n.resources" value="mess"/>
<span style="white-space:pre"> </span><!-- 指定国际化编码所使用的字符集 --><span style="white-space:pre"> </span>
<span style="white-space:pre"> </span><constant name="struts.i18n.encoding" value="GBK"/>
<span style="white-space:pre"> </span><!-- 所有的Action定义都应该放在package下 -->
<span style="white-space:pre"> </span><package name="lee" extends="struts-default">
<span style="white-space:pre"> </span><action name="login" class="org.crazyit.app.action.LoginAction">
<span style=&