[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]tomcat启动时打印:At least one JAR was scanned for TLDs yet contained no TLDs

上一篇:[备忘]log4j2动态创建Logger
下一篇:[备忘]关于org.apache.catalina.startup.ContextConfig.jarsToSkip

添加日期:2024/2/20 10:23:31 快速返回   返回列表 阅读137次
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包
我感觉,应该加在这里。

 

评论 COMMENTS
没有评论 No Comments.

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved