springmvc编码问题
web.xml中加入
1 <filter> 2 <filter-name>encodingFilter</filter-name> 3 <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> 4 <init-param> 5 <param-name>encoding</param-name> 6 <param-value>UTF-8</param-value> 7 </init-param> 8 <init-param> 9 <param-name>forceEncoding</param-name> 10 <param-value>true</param-value> 11 </init-param> 12 </filter> 13 <!-- encoding filter for jsp page --> 14 <filter-mapping> 15 <filter-name>encodingFilter</filter-name> 16 <url-pattern>/*</url-pattern> 17 </filter-mapping> 18