Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of sending ajax garbled codes

Shulou Source: shulou.com Published: 2022-06-02 06:17:13 11月12日 Update

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.

Tags: Garbled problem utf-8 content character fault page interceptor learning configuration practicality deeper interest method practicality practicality simple operation method more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Redmi Microsoft MySQL Shulou Information