How to make Tomcat/Catalina TLDScanner ignore a bunch of JARs

This was just an annoying message for some web apps I’ve been maintaining. I couldn’t get it to just ignore the directory so here’s how I enumerated all the JARs. My web apps are all stored in /opt/tomcat/webapps. YMMV.

grep -oE "/opt/tomcat/webapps/\S+\.jar" /opt/tomcat/logs/catalina.out | awk -F/ '{print $NF",\\"}' | sort | uniq

Then just copy/paste the results in /opt/tomcat/conf/catalina.properties under the tomcat.util.scan.StandardJarScanFilter.jarsToSkip key and restart the server.

systemctl restart tomcat && tailf /opt/tomcat/logs/catalina.out

Happy serving!

Design a site like this with WordPress.com
Get started