笔者最近使用tomcat9,由于工作洁癖,盯上了tomcat启动日志里的"No TLD files were found in"字样,如下
15-Sep-2017 02:19:09.685 FINE [main] org.apache.jasper.servlet.TldScanner$TldScannerCallback.scan No TLD files were found in [file:/home/tomcat9/webapps/xxx/WEB-INF/lib/z-1.1.3.jar]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
于是按照以下stackoverflow两篇文章进行优化
How to fix “JARs that were scanned but no TLDs were found in them ” in Tomcat 9.0.0M10
How to fix JSP compiler warning: one JAR was scanned for TLDs yet contained no TLDs?
把z-1.1.3.jar添加到了${catalina.base}/conf/catalina.properties里面,如下
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=z-1.1.3.jar
结果吧z-1.1.3.jar每次上传到WEB_INF/lib/目录下tomcat都能正常运行,可是与预期的结果不一致,最终经过排查发现了这个原因。
解决方法:把z-1.1.3.jar从jarSkip去掉重启tomcat即可。
其他资源:
Logging in Tomcat tomcat全局日志记录与web应用日志记录
创作文章不容易,转载文章必须注明文章出处;如果这篇文章对您有帮助,点击右侧打赏,支持一下吧。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步