struts2 的字符集 主要有三种配置方式:
1、在struts.properties 中添加
struts.i18n.encoding=相关编码集
2、在struts.xml 中设定
<constant name="struts.i18n.encoding" value="utf-8"></constant>
3、在filter中 web.xml(项目的webxml中)
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>struts.i18n.encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>