The parameters of spring MVC receiving get requests are not necessarily garbled
tomcat 8.xx Before the encoding default is iso After the encoding default is utf-8
Spring MVC receives post requests without coding rules, so it will be garbled
web.xml add CharacterEncodingFilter
<filter>
<filter-name>charset</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>
</filter>
<filter-mapping>
<filter-name>charset</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Similar Posts:
- Tomcat set x-frame-option
- Struts 2.0 Error: The Struts dispatcher cannot be found (Error 500 Internal Server Error)
- How to Solve log4net multi process access log file Error
- How to Solve Error: Preflight response is not successful
- Configure Struts2 web.xml to report an error [How to Solve]
- [Solved] Spring Error: Artifact spring:war exploded: Error during artifact deployment. See server log for details
- [Solved] com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes
- [Solved] Dubbo uses filter error: No such extension consumerStaticFilter for filter/com.alibaba.dubbo.rpc.Filter
- Web project management web.xml Listener monitoring summary
- [Solved] Warning: Servlet threw load() exception java.lang.ClassNotFoundException: org.glassfish.jersey.servlet…