Jetty's Chinese problems have never been well implemented by Tomcat, so Chinese garbled characters often occur. Jetty-maven-plugin is used in the work, and jetty and maven are used in combination to deploy and release projects. However, Chinese characters are always garbled during requests in the browser, however, it is normal to deploy the project to Tomcat. Because it has been busy, and Tomcat is used in the online environment, it will not be solved without affecting the work. Today, I felt uncomfortable looking at the strange garbled characters, so I took some time to check related problems. Google Baidu found many problems in this regard for a while, but they are not consistent with my problems. Some solutions, such as Jetty version change, won't work. The developer tool of chrome browser is called up (press the F12 key in chrome), and the relevant Request and Response parameters are viewed in detail. It is found that the Response content of the program is also correct, garbled characters occur during browser parsing. And compare Jetty and Tomcat parameters found that Tomcat Response: Content-Type: text/html; charset = Response: Content-Type: in text/html, there must be a problem here. In addition to some information found on Google, I thought of resetting ContentType with Response. The relevant code is as follows: @ RequestMapping (value = "getDealGeoSearchForMobile ") @ ResponseBodypublicbyte [] getDealGeoSearch (HttpServletResponse response) {response. setContentType ("text/html; charset = UTF-8"); return "Chinese";} then tested, garbled Code finally disappeared. Everything works. In addition. in xml, you also need to configure the relevant EncodingFilter to make the encoding into a UTF-8, the configuration is as follows: <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>.