Apache Tomcat 9 配置 问题记录

Apache Tomcat 9 (9.0.60) - Documentation Index

  1. CGI - Using CGIs with Apache Tomcat.
  2. JNDI Resources - Configuring standard and custom resources in the JNDI naming context that is provided to each web application.
  3. JDBC DataSource - Configuring a JNDI DataSource with a DB connection pool. Examples for many popular databases.
  4. Classloading - Information about class loading in Apache Tomcat, including where to place your application classes so that they are visible.
  5. Apache Tomcat 9 (9.0.60) - Windows Service How-To
  6. Apache Tomcat 9 (9.0.60) - Connectors How To

5 类加载规则:

When Tomcat is started, it creates a set of class loaders that are organized into the following parent-child relationships, where the parent class loader is above the child class loader:

      Bootstrap
          |
       System
          |
       Common
       /     \
  Webapp1   Webapp2 ...
The characteristics of each of these class loaders, including the source of classes and resources that they make visible, are discussed in detail in the following section.

Tomcat的catalina.properties文件位于%CATALINA_HOME%/conf/目录下面,该文件主要配置tomcat的安全设置、类加载设置、不需要扫描的类设置、字符缓存设置四大块。

catalina.properties中的设置项包括四个部分:
第一部分:安全设置
package.access
package.definition
第二部分:类加载设置
common.loader
server.loader
shared.loader
第三部分:忽略扫描和需要扫描类设置
tomcat.util.scan.DefaultJarScanner.jarsToSkip #不需要扫描
tomcat.util.scan.StandardJarScanFilter.jarsToScan #需要扫描
第四部分:字符缓存设置
tomcat.util.buf.StringCache.byte.enabled
tomcat.util.buf.StringCache.char.enabled
tomcat.util.buf.StringCache.trainThreshold
tomcat.util.buf.StringCache.cacheSize

6  Connectors
HTTP(默认选项)(非集群设定时使用)

For clustering, an HTTP load balancer with support for web sessions stickiness must be installed to direct the traffic to the Tomcat servers.
Tomcat supports mod_proxy (on Apache HTTP Server 2.x, and included by default in Apache HTTP Server 2.2) as the load balancer.
It should be noted that the performance of HTTP proxying is usually lower than the performance of AJP, so AJP clustering is often preferable.
AJP (集群设定的时候使用)

启动乱码 :

31-Mar-2022 12:16:50.684 諠・ア [main] org.apache.coyote.AbstractProtocol.start 繝励Ο繝医さ繝ォ繝上Φ繝峨Λ繝シ ["http-nio-8080"] 繧帝幕蟋九@縺セ縺励◆縲・

对应案:

修正ファイル:    
    D:\WMS\apache-tomcat-9.0.59\conf\logging.properties
修正内容:    
    java.util.logging.ConsoleHandler.encoding = UTF-8
    →
    java.util.logging.ConsoleHandler.encoding = MS932

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值