How to solve the problem of sending ajax garbled codes
This article mainly explains "how to solve the problem of sending ajax garbled code", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the problem of sending ajax garbled codes".
The solution to sending ajax garbled codes: 1, check whether the character interceptor is configured in web.xml; 2, change the jsp page to utf-8;3, and change the ajax request to post request.
This article operating environment: windows7 system, jquery3.2.1 version, Dell G3 computer.
How to solve the problem of sending ajax garbled codes?
Resolve the problem of Chinese garbled code when JQuery sends ajax request:
First troubleshoot the project:
Whether a character interceptor is configured in 1.web.xml
EncodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding utf-8 forceEncoding true encodingFilter / *
Is the 2.jsp page utf-8?
Add this tag by the way, send utf-8 uniformly, but I heard that there are some chicken ribs.