Tomcat:org.apache.碧玉.servlet.TldScanner.scanResourcePaths在资源路径[/WEB-INF/ ]中未找到TLD文件

pdkcd3nj  于 2022-11-13  发布在  Apache
关注(0)|答案(1)|浏览(512)

在Tomcat 8.5中,我使用tomcat.util.scan.StandardJarScanFilter.jarsToSkip排除了许多jar(取决于日志消息
即使排除的大多数jar都在WEB-INF/lib下,我仍然会收到最后一条消息:
11:17:58.161 FINE [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanResourcePaths No TLD files were found in resource path [/WEB-INF/].
那么我该如何删除它呢?我怀疑是因为它而没有部署。我试图将/WEB-INF(或附近的)添加到jarsToSkip的列表中,但消息仍然存在。

  • 谢谢-谢谢
kyvafyod

kyvafyod1#

此消息并不重要,参见8.5.79 TldScanner来源:

/**
 * Scan web application resources for TLDs, recursively.
 *
 * @param startPath the directory resource to scan
 * @throws IOException  if there was a problem scanning for or loading a TLD
 * @throws SAXException if there was a problem parsing a TLD
 */
protected void scanResourcePaths(String startPath)
        throws IOException, SAXException {

    boolean found = false;
    Set<String> dirList = context.getResourcePaths(startPath);
    if (dirList != null) {
        for (String path : dirList) {
            if (path.startsWith("/WEB-INF/classes/")) {
                // Skip: JSP.7.3.1
            } else if (path.startsWith("/WEB-INF/lib/")) {
                // Skip: JSP.7.3.1
            } else if (path.endsWith("/")) {
                scanResourcePaths(path);
            } else if (path.startsWith("/WEB-INF/tags/")) {
                // JSP 7.3.1: in /WEB-INF/tags only consider implicit.tld
                if (path.endsWith("/implicit.tld")) {
                    found = true;
                    parseTld(path);
                }
            } else if (path.endsWith(TLD_EXT)) {
                found = true;
                parseTld(path);
            }
        }
    }
    if (found) {
        if (log.isDebugEnabled()) {
            log.debug(Localizer.getMessage("jsp.tldCache.tldInResourcePath", startPath));
        }
    } else {
        if (log.isDebugEnabled()) {
            log.debug(Localizer.getMessage("jsp.tldCache.noTldInResourcePath", startPath));
        }
    }
}


jsp.tldCache.noTldInResourcePath=No TLD files were found in resource path [{0}].

相关问题