在Struts2-core-2.0.14.jar的org.apache.struts2目录下有
default.properties中的配置为以下(设置语言环境):
### This can be used to set your default locale and encoding scheme
# struts.locale=en_US
解决方法(有两种):
1、在WEB-INF/struts.properties或者src/struts.properties文件中如下配置:
struts.locale=en_GB 或者是 #struts.locale=zh_CN
2、在struts.xml中如下配置; (似乎不好用)
<constant name="struts.locale" value="en_GB" />
注:
struts2中管理struts2属性的3中管理方式:
1.通过struts.properties文件来配置
2.通过strutsxml 文件中配置constant元素来配置
3.在web.xml中配置
struts2配置文件加载顺序:
1.struts-default.xml :在struts-core.jar
2.struts-plugin.xml :在struts2-spring-plugin-2.0.14.jar
3.struts.xml
4.struts.properties
5.web.xml
default.properties中的配置为以下(设置语言环境):
### This can be used to set your default locale and encoding scheme
# struts.locale=en_US
解决方法(有两种):
1、在WEB-INF/struts.properties或者src/struts.properties文件中如下配置:
struts.locale=en_GB 或者是 #struts.locale=zh_CN
2、在struts.xml中如下配置; (似乎不好用)
<constant name="struts.locale" value="en_GB" />
注:
struts2中管理struts2属性的3中管理方式:
1.通过struts.properties文件来配置
2.通过strutsxml 文件中配置constant元素来配置
3.在web.xml中配置
struts2配置文件加载顺序:
1.struts-default.xml :在struts-core.jar
2.struts-plugin.xml :在struts2-spring-plugin-2.0.14.jar
3.struts.xml
4.struts.properties
5.web.xml