1. 在tomcat/conf/logging.properties文件的未尾添加:
(网上基本上只叫添加一个,但是我试过不行,不知道什么原因,然后我加了下面三个就可以了)
org.apache.catalina.startup.TldConfig.level = FINE
org.apache.jasper.compiler.TldLocationsCache.level = FINE
org.apache.jasper.servlet.TldScanner.level = FINE
2. 重启tomcat
3. cd到tomcat/logs目录下执行命令:
egrep "No TLD files were found in \[file:[^\]+\]" /var/usr/tomcat/logs/catalina.out -o | egrep "[^]/]+.jar" -o | sort | uniq | sed -e 's/.jar/.jar,\\/g' > ./skips.txt
4. 在当前目录下找到skips.txt,把内容拷贝至tomcat/conf/catalina.properties文件中的 “org.apache.catalina.startup.TldConfig.jarsToSkip=” 处,保存该文件
5. 把步骤1的三行注释掉
6. (最好先删除 tomcat/work 下的所有内容)重启 Tomcat