Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop org.apache.jasper.servlet.TldScanner.scanJars via my war file's local context.xml rather than altering Tomcat 8?

I'm trying to prevent the...

[localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.

...error from showing up for my war file deployment since I have no TLD defined.

There are many questions and answers regarding this issue but they all seem to point to altering Tomcat's global configuration, which I do not want.

How can I, via my war file's local context.xml file, inform the scanner that no TLD exists and therefore a scan and subsequent warning is unnecessary?

like image 355
dacracot Avatar asked Oct 19 '22 04:10

dacracot


1 Answers

First add logging.properties below:

org.apache.jasper.servlet.TldScanner.level = FINE

Second restart tomcat.

Third open logs/catalina.out and you can find below:

31-Oct-2017 09:20:37.563 FINE [localhost-startStop-1] org.apache.jasper.servlet.TldScanner$TldScannerCallback.scan No TLD files were found in [file:/home/vhr/lib/jcert.jar]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.

Fourth if you don't scan jcert.jar, you edit conf/catalina.properties, add jcert.jar to tomcat.util.scan.StandardJarScanFilter.jarsToSkip.

Sorry for my poor English.

like image 181
user8859603 Avatar answered Oct 21 '22 16:10

user8859603