tldConfig.addListeners=Adding {0} listeners from TLD files
tldConfig.cce=Lifecycle event data object {0} is not a Context
tldConfig.classloaderFail=Failed to process ''{0}'' for TLDs.
+tldConfig.classloaderStart=Scanning for TLDs in classloader hierarchy
tldConfig.execute=Error processing TLD files for context path {0}
+tldConfig.jarUrlStart=Scanning for TLD files in URL ''{0}''
tldConfig.webinflibStart=Scanning WEB-INF/lib for JARs containing META-INF/**/*.TLD
tldConfig.webinflibJarFail=Failed to scan JAR ''{0}'' for TLDs
tldConfig.webinfFail=Failed to process TLD found at ''{0}''
private static final String WEB_INF = "/WEB-INF/";
private static final String WEB_INF_LIB = "/WEB-INF/lib/";
+ // Configuration properties
+ private static final boolean SCAN_CLASSPATH = Boolean.valueOf(
+ System.getProperty(
+ "org.apache.jasper.compiler.TldLocationsCache.SCAN_CLASSPATH",
+ "true")).booleanValue();
+
// Names of JARs that are known not to contain any TLDs
private static HashSet<String> noTldJars;
tldScanWebInfLib();
// Stage 4 - Additional entries from the container
- tldScanClassloaders();
+ if (SCAN_CLASSPATH) {
+ tldScanClassloaders();
+ }
// Now add all the listeners we found to the listeners for this context
String list[] = getTldListeners();
*/
private void tldScanClassloaders() {
+ if (log.isTraceEnabled()) {
+ log.trace(sm.getString("tldConfig.classloaderStart"));
+ }
+
ClassLoader loader =
Thread.currentThread().getContextClassLoader();
* Keep in sync with o.a.j.comiler.TldLocationsCache
*/
private void tldScanJar(URL url) throws IOException {
+ if (log.isTraceEnabled()) {
+ log.trace(sm.getString("tldConfig.jarUrlStart", url));
+ }
+
URLConnection conn = url.openConnection();
if (conn instanceof JarURLConnection) {
tldScanJar((JarURLConnection) conn);
private static final String JAR_EXT = ".jar";
private static final String TLD_EXT = ".tld";
+ // Configuration properties
+ private static final boolean SCAN_CLASSPATH = Boolean.valueOf(
+ System.getProperty(
+ "org.apache.jasper.compiler.TldLocationsCache.SCAN_CLASSPATH",
+ "true")).booleanValue();
+
// Names of JARs that are known not to contain any TLDs
private static HashSet<String> noTldJars;
tldScanWebXml();
tldScanResourcePaths(WEB_INF);
tldScanWebInfLib();
- tldScanClassloaders();
+ if (SCAN_CLASSPATH) {
+ tldScanClassloaders();
+ }
initialized = true;
} catch (Exception ex) {
throw new JasperException(Localizer.getMessage(
private void tldScanJar(URL url) throws IOException {
URLConnection conn = url.openConnection();
if (conn instanceof JarURLConnection) {
- scanJar((JarURLConnection) conn);
+ tldScanJar((JarURLConnection) conn);
} else {
String urlStr = url.toString();
if (urlStr.startsWith(FILE_PROTOCOL)
&& urlStr.endsWith(JAR_EXT)) {
URL jarURL = new URL("jar:" + urlStr + "!/");
- scanJar((JarURLConnection) jarURL.openConnection());
+ tldScanJar((JarURLConnection) jarURL.openConnection());
}
}
}
*
* Keep in sync with o.a.c.startup.TldConfig
*/
- private void scanJar(JarURLConnection conn) throws IOException {
+ private void tldScanJar(JarURLConnection conn) throws IOException {
JarFile jarFile = null;
String resourcePath = conn.getJarFileURL().toString();
<code>true</code> will be used.</p>
</property>
+ <property name="org.apache.jasper.compiler. TldLocationsCache.SCAN_CLASSPATH">
+ <p>When scanning the class path for TLDs, should Jasper scan all JAR files
+ in the classpath, including those provided by the web application's parent
+ clasloaders? This is intended for sharing tag libraries between multiple
+ web applications by making the JAR available via the common or shared
+ classloader. If not specified, the default value of <code>true</code> will
+ be used.</p>
+ </property>
+
<property name="org.apache.jasper.runtime. BodyContentImpl.LIMIT_BUFFER">
<p>If <code>true</code>, any tag buffer that expands beyond
<code>org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE</code> will be