Linux教程網
解決方法解決問1:
在strus2.xml文件中加上
- <constant name="struts.i18n.encoding" value="UTF-8" />
- <constant name="struts.i18n.reload" value="true" />
解決方法2:
在web.xml文件中加上
- <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>
Copyright ©
Linux教程網 All Rights Reserved