解决strus2中文乱码
解决方法解决问1:
在strus2.xml文件中加上
[html]
<constant name="struts.i18n.encoding" value="UTF-8" />
<constant name="struts.i18n.reload" value="true" />
解决方法2:
在web.xml文件中加上
[html]
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
作者:xmq_666
补充:软件开发 , Java ,