zoukankan      html  css  js  c++  java
  • 解决idea tomcat乱码问题

    解决idea Server Output、TomcatLocalhost Log、Tomcat Catalina Log控制台乱码问题

    1571192138704

    问题原因:编码不一致,tomcat启动后默认编码UTF-8,而windows的默认编码是GBK。所以只需配置启动tomcat后为GBK编码即可。

    # Describes specific configuration info for Handlers.
    ############################################################
    
    1catalina.org.apache.juli.AsyncFileHandler.level = FINE
    1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
    1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
    1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90
    1catalina.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    2localhost.org.apache.juli.AsyncFileHandler.level = FINE
    2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
    2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
    2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90
    2localhost.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    3manager.org.apache.juli.AsyncFileHandler.level = FINE
    3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
    3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
    3manager.org.apache.juli.AsyncFileHandler.maxDays = 90
    3manager.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
    4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
    4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
    4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90
    4host-manager.org.apache.juli.AsyncFileHandler.encoding = GBK
    
    java.util.logging.ConsoleHandler.level = FINE
    java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
    #java.util.logging.ConsoleHandler.encoding = GBK
    java.util.logging.ConsoleHandler.encoding = GBK
    
    ############################################################
    

    1571192330355

    保存,然后重启tomcat就行了。

    1571192463926

  • 相关阅读:
    VB与SQL Server实现文件上传下载
    rszl数据表和crjsj数据表的关联查询
    网吧忘关QQ的后果
    走 近 WSH
    形容长得丑的30句经典句子
    关机VBS脚本
    C51单片机中断定义
    .NET架构的核心技术
    SQL SERVER的命令行工具Osql的用法
    七七情人节
  • 原文地址:https://www.cnblogs.com/mengw/p/11683904.html
Copyright © 2011-2022 走看看