5

我试图阻止...

[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.

...由于我没有定义 TLD,因此出现我的 war 文件部署时出错。

关于这个问题有很多问题和答案,但它们似乎都指向改变 Tomcat 的全局配置,这是我不想要的。

如何通过我的 war 文件的本地 context.xml 文件通知扫描仪不存在 TLD,因此不需要扫描和后续警告?

4

1 回答 1

3

首先在logging.properties下面添加:

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

第二次重启tomcat。

第三次打开logs/catalina.out,您可以在下面找到:

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.

第四,如果你不扫描jcert.jar,你编辑conf/catalina.properties,添加jcert.jartomcat.util.scan.StandardJarScanFilter.jarsToSkip

对不起我的英语不好。

于 2017-10-31T01:23:53.097 回答