At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
大概意思说,有一些jar包里面没有TLD,但还是进行了扫描,浪费资源了 可以开启debug,把这些jar包打印出来。 ------------------------------ (1)打开apache-tomcat-7.0.72\conf\logging.properties文件 添加 org.apache.catalina.startup.TldConfig.level=FINE 然后看catalina.2024-02-20.log,应该就能打印出来了 ------------------------------ (2)但我是idea里工程起的tomcat,折腾好久都不行, 后来搜到需要在debug的tomcat设置里,添加vm参数 -Djava.util.logging.config.file="E:\apache-tomcat-7.0.72\conf\logging.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
然后就能打印出来了。
这俩参数是catalina.bat里添加的,所以直接起tomcat没问题。 -------------------------------- (3)获取到这些jar包名字后,打开apache-tomcat-7.0.72\conf\catalina.properties文件 里面有tomcat.util.scan.DefaultJarScanner.jarsToSkip属性,这是跳过jar扫描的jar包, 里面已经有一堆jar包了。
# Additional JARs (over and above the default JARs listed above) to skip when # scanning for Servlet 3.0 pluggability features. These features include web # fragments, annotations, SCIs and classes that match @HandlesTypes. The list # must be a comma separated list of JAR file names. org.apache.catalina.startup.ContextConfig.jarsToSkip= 这个是Servlet 3.0 pluggability features,额外多排除的jar包
# Additional JARs (over and above the default JARs listed above) to skip when # scanning for TLDs. The list must be a comma separated list of JAR file names. org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar 这个是TLD扫描额外多排除的jar包 我感觉,应该加在这里。
|