OS: Red Hat Enterprise Linux Server release 7.8 (Maipo)
Tomcat: 9
中文显示为???问号

在$CATALINA_HOME/conf下的logging.properties 添加

java.util.logging.ConsoleHandler.encoding=GBK

(视个人具体情况而定,如果GBK不行,可以把GBK换成UTF8)

形如:

另外需要注意,$CATALINA_HOME/bin下的 catalina.sh 中的JAVA_OPTS保持系统默认(注释掉的状态)即可,不要强行改成UTF8或者其他字符集。

sed -i 's/org.apache.juli.OneLineFormatter/&\njava.util.logging.ConsoleHandler.encoding=GBK/' logging.properties

相关文章:

  • 2021-07-28
  • 2021-10-09
  • 2021-12-15
  • 2021-11-28
  • 2021-08-08
  • 2021-04-21
猜你喜欢
  • 2022-12-23
  • 2021-04-17
  • 2022-01-15
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案