import org.apache.jasper.util.ExceptionUtils;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.JarScanner;
import org.apache.tomcat.JarScannerCallback;
public class TldLocationsCache {
+ private final Log log = LogFactory.getLog(TldLocationsCache.class);
+
/**
* The types of URI one may specify for a tag library
*/
JarFile jarFile = null;
String resourcePath = conn.getJarFileURL().toString();
+ boolean foundTld = false;
try {
conn.setUseCaches(false);
jarFile = conn.getJarFile();
String name = entry.getName();
if (!name.startsWith("META-INF/")) continue;
if (!name.endsWith(".tld")) continue;
+ foundTld = true;
InputStream stream = jarFile.getInputStream(entry);
tldScanStream(resourcePath, name, stream);
}
}
}
}
+ if (!foundTld) {
+ log.info(Localizer.getMessage("jsp.tldCache.noTldInJar",
+ resourcePath));
+ }
}
/*
jsp.message.jsp_unload_check=Checking JSPs for unload in context [{0}], JSP count: {1} queue length: {2}
xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream
+
+jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
\ No newline at end of file
Correct a regression in the fix for <bug>49916</bug> that resulted in
JSPs being compiled twice rather than just once. (markt)
</fix>
+ <add>
+ Log JARs that are scanned for TLDs where no TLD is found so that users
+ can easily identify JARs that can be added to the list of JARs to skip.
+ (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Web applications">