tomcat console Chinese garbage problem looking for a solution

  • We looked at a variety of solutions, but did not solve

Such as the following:

Tomcat console UTF-8 garbled
1, cmd modified encoding format

Shortcuts win + R to open the Run program, type regedit to open the registry, find and modify the Road King.

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Command Processor], create a new string value, key-value as follows:
"Autorun" = "the chcp 65001", can then re-open cmd.

 

2, modify the file in the Tomcat bin directory startup.bat

将call "%EXECUTABLE%" start %CMD_LINE_ARGS%  改为 call "%EXECUTABLE%" run %CMD_LINE_ARGS%

 

3, modify the file in the Tomcat bin directory catalina.bat

将set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"

改为:set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% -Dfile.encoding=UTF-8"

Restart tomcat solve utf-8 garbled display problem

 

Top that way too much trouble, if some things make mistakes, it would be dumbfounded, software this kind of thing, scalability should be good, so I do not believe that the top of the method

  • The machine configuration, applicability, reference for others

1. win10 machine

2. tomcat Version: 7.0.92

 

  • Final settlement

1, {CATALINA_HOME} /conf/logging.properties find $
2, add the statement: java.util.logging.ConsoleHandler.encoding GBK =
3, restart tomcat, you can view the log data!

Reference Source: https://blog.csdn.net/lyz_112233/article/details/80811051

Original Address: https: //blog.csdn.net/lc11535/article/details/86112428

Guess you like

Origin www.cnblogs.com/jpfss/p/12111596.html
Recommended