View | Details | Raw Unified | Return to bug 56438
Collapse All | Expand All

(-)java/org/apache/catalina/startup/LocalStrings.properties (+4 lines)
Lines 122-133 Link Here
122
hostConfig.undeployVersion=Undeploying old version of context [{0}] which has no active session
122
hostConfig.undeployVersion=Undeploying old version of context [{0}] which has no active session
123
tldConfig.addListeners=Adding {0} listeners from TLD files
123
tldConfig.addListeners=Adding {0} listeners from TLD files
124
tldConfig.cce=Lifecycle event data object {0} is not a Context
124
tldConfig.cce=Lifecycle event data object {0} is not a Context
125
tldConfig.noTldInResourcePath=No TLD files were found in resource path [{0}].
126
tldConfig.tldInResourcePath=TLD files were found in resource path [{0}].
125
tldConfig.dirFail=Failed to process directory [{0}] for TLD files
127
tldConfig.dirFail=Failed to process directory [{0}] for TLD files
126
tldConfig.dirScan=Scanning for TLD files in directory [{0}]
128
tldConfig.dirScan=Scanning for TLD files in directory [{0}]
127
tldConfig.noTldInDir=No TLD files were found in directory [{0}].
129
tldConfig.noTldInDir=No TLD files were found in directory [{0}].
130
tldConfig.tldInDir=TLD files were found in directory [{0}].
128
tldConfig.execute=Error processing TLD files for context with name [{0}]
131
tldConfig.execute=Error processing TLD files for context with name [{0}]
129
tldConfig.jarFail=Failed to process JAR [{0}] for TLD files
132
tldConfig.jarFail=Failed to process JAR [{0}] for TLD files
130
tldConfig.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to the org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
133
tldConfig.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to the org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
134
tldConfig.tldInJar=TLD files were found in JAR [{0}]. 
131
tldConfig.noTldSummary=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.
135
tldConfig.noTldSummary=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.
132
tldConfig.webinfFail=Failed to process TLD found at [{0}]
136
tldConfig.webinfFail=Failed to process TLD found at [{0}]
133
tldConfig.webinfScan=Scanning WEB-INF for TLD files in [{0}]
137
tldConfig.webinfScan=Scanning WEB-INF for TLD files in [{0}]
(-)java/org/apache/catalina/startup/TldConfig.java (-4 / +27 lines)
Lines 263-269 Link Here
263
        
263
        
264
        // Stage 3a - TLDs under WEB-INF (not lib or classes)
264
        // Stage 3a - TLDs under WEB-INF (not lib or classes)
265
        tldScanResourcePaths(WEB_INF);
265
        tldScanResourcePaths(WEB_INF);
266
266
        
267
        // Stages 3b & 4
267
        // Stages 3b & 4
268
        JarScanner jarScanner = context.getJarScanner();
268
        JarScanner jarScanner = context.getJarScanner();
269
        
269
        
Lines 388-395 Link Here
388
     * 
388
     * 
389
     * Keep in sync with o.a.j.comiler.TldLocationsCache
389
     * Keep in sync with o.a.j.comiler.TldLocationsCache
390
     */
390
     */
391
    private void tldScanResourcePaths(String startPath) {
391
    private boolean tldScanResourcePaths(String startPath) {
392
392
393
        boolean isFound = false;
393
        if (log.isTraceEnabled()) {
394
        if (log.isTraceEnabled()) {
394
            log.trace(sm.getString("tldConfig.webinfScan", startPath));
395
            log.trace(sm.getString("tldConfig.webinfScan", startPath));
395
        }
396
        }
Lines 411-416 Link Here
411
                            !path.endsWith("implicit.tld")) {
412
                            !path.endsWith("implicit.tld")) {
412
                        continue;
413
                        continue;
413
                    }
414
                    }
415
                    isFound = true;                   
414
                    InputStream stream = ctxt.getResourceAsStream(path);
416
                    InputStream stream = ctxt.getResourceAsStream(path);
415
                    try {
417
                    try {
416
                        XmlErrorHandler handler = tldScanStream(stream);
418
                        XmlErrorHandler handler = tldScanStream(stream);
Lines 432-437 Link Here
432
                }
434
                }
433
            }
435
            }
434
        }
436
        }
437
        
438
        if(!isFound){
439
            if (log.isDebugEnabled()) {
440
                log.debug(sm.getString("tldConfig.noTldInResourcePath", startPath));
441
            }
442
        }else{
443
            if (log.isDebugEnabled()) {
444
                log.debug(sm.getString("tldConfig.tldInResourcePath", startPath));
445
            }
446
        }
447
        return isFound;
435
    }
448
    }
436
    
449
    
437
    /*
450
    /*
Lines 455-461 Link Here
455
                    tldScanDir(fileList[i]);
468
                    tldScanDir(fileList[i]);
456
                } else if (fileList[i].getAbsolutePath().endsWith(TLD_EXT)) {
469
                } else if (fileList[i].getAbsolutePath().endsWith(TLD_EXT)) {
457
                    InputStream stream = null;
470
                    InputStream stream = null;
458
                    isFound = true;
471
                    isFound = true;                    
459
                    try {
472
                    try {
460
                        stream = new FileInputStream(fileList[i]);
473
                        stream = new FileInputStream(fileList[i]);
461
                        XmlErrorHandler handler = tldScanStream(stream);
474
                        XmlErrorHandler handler = tldScanStream(stream);
Lines 480-485 Link Here
480
            if (log.isDebugEnabled()) {
493
            if (log.isDebugEnabled()) {
481
                log.debug(sm.getString("tldConfig.noTldInDir", start.getAbsolutePath()));
494
                log.debug(sm.getString("tldConfig.noTldInDir", start.getAbsolutePath()));
482
            }
495
            }
496
        }else{
497
            if (log.isDebugEnabled()) {
498
                log.debug(sm.getString("tldConfig.tldInDir",
499
                        start.getAbsolutePath()));
500
            }
483
        }
501
        }
484
        return isFound;
502
        return isFound;
485
    }
503
    }
Lines 506-512 Link Here
506
            while (entryName != null) {
524
            while (entryName != null) {
507
                if (entryName.startsWith("META-INF/") &&
525
                if (entryName.startsWith("META-INF/") &&
508
                        entryName.endsWith(".tld")) {
526
                        entryName.endsWith(".tld")) {
509
                    isFound = true;
527
                    isFound = true;                    
510
                    is = null;
528
                    is = null;
511
                    try {
529
                    try {
512
                        is = jar.getEntryInputStream();
530
                        is = jar.getEntryInputStream();
Lines 530-535 Link Here
530
                    log.debug(sm.getString("tldConfig.noTldInJar",
548
                    log.debug(sm.getString("tldConfig.noTldInJar",
531
                            jarConn.getURL().getFile()));
549
                            jarConn.getURL().getFile()));
532
                }
550
                }
551
            }else{
552
                if (log.isDebugEnabled()) {
553
                    log.debug(sm.getString("tldConfig.tldInJar",
554
                            jarConn.getURL().getFile()));
555
                }
533
            }
556
            }
534
        } catch (IOException ioe) {
557
        } catch (IOException ioe) {
535
            log.warn(sm.getString("tldConfig.jarFail", jarConn.getURL()), ioe);
558
            log.warn(sm.getString("tldConfig.jarFail", jarConn.getURL()), ioe);

Return to bug 56438