刚开始用struts2时,启动tomcat常会出现如下信息:
Warning:Could not parse struts.locale setting, substituting default VM locale
这是默认语言环境没有配置:有两种方法可以解决
可以在struts-2.1.6中找struts-2.1.6\src\core\src\test\resources\struts.properties,
最好,通过按F3搜索struts.properties,即可找到
在WEB-INF/struts.properties或者src/struts.properties文件中如下配置:
struts.locale=en_GB
或者在struts.xml中如下配置;
<constant name="struts.locale" value="en_GB" />
Warning:Could not parse struts.locale setting, substituting default VM locale
这是默认语言环境没有配置:有两种方法可以解决
可以在struts-2.1.6中找struts-2.1.6\src\core\src\test\resources\struts.properties,
最好,通过按F3搜索struts.properties,即可找到
在WEB-INF/struts.properties或者src/struts.properties文件中如下配置:
struts.locale=en_GB
或者在struts.xml中如下配置;
<constant name="struts.locale" value="en_GB" />
Struts2语言环境配置
本文介绍了在使用Struts2框架时如何配置语言环境来解决警告信息问题。提供了两种配置方法,一种是在struts.properties文件中设置,另一种是在struts.xml文件中定义。

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



