Newbie on the road, if not welcome message

Resolve Tomcat and IDEA console garbled characters

1. Change the vmoptions

Add -dfile.encoding =UTF-8 on the last line

-Dfile.encoding=UTF-8
Copy the code

2. Change Tomcat VM Options

3. Change the project code of IDEA

4. Change Tomcat Config

You can change the service. XML and logging.properties files in the Config folder of the Tomcat installation directory

Service.xml changes as follows:

 URIEncoding="UTF-8"
Copy the code

Logging.properties changed as follows:

Changed in utf-8


Novice on the road, if you have any questions welcome to point out

Point out: I see many blogs directly go to the IDEA installation directory to find vmOptions, but when accessing the servlet and then printing the console, there will be Chinese gibberish. Later, I do not change the VMOptions under the IDEA installation directory, but directly modify the IDEA (refer to the first step).