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

(-)java/org/apache/jasper/resources/LocalStrings.properties (+5 lines)
Lines 389-395 Link Here
389
389
390
xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream
390
xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream
391
391
392
jsp.tldCache.noTldInResourcePath=No TLD files were found in resource path [{0}].
393
jsp.tldCache.tldInResourcePath=TLD files were found in resource path [{0}].
394
jsp.tldCache.noTldInDir=No TLD files were found in directory [{0}].
395
jsp.tldCache.tldInDir=TLD files were found in directory [{0}].
392
jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
396
jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
397
jsp.tldCache.tldInJar=TLD files were found in JAR [{0}].
393
jsp.tldCache.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.
398
jsp.tldCache.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.
394
399
395
#ELInterpreter
400
#ELInterpreter
(-)java/org/apache/jasper/servlet/TldScanner.java (-2 / +33 lines)
Lines 220-225 Link Here
220
    protected void scanResourcePaths(String startPath)
220
    protected void scanResourcePaths(String startPath)
221
            throws IOException, SAXException {
221
            throws IOException, SAXException {
222
222
223
        boolean found = false;
223
        Set<String> dirList = context.getResourcePaths(startPath);
224
        Set<String> dirList = context.getResourcePaths(startPath);
224
        if (dirList != null) {
225
        if (dirList != null) {
225
            for (String path : dirList) {
226
            for (String path : dirList) {
Lines 232-244 Link Here
232
                } else if (path.startsWith("/WEB-INF/tags/")) {
233
                } else if (path.startsWith("/WEB-INF/tags/")) {
233
                    // JSP 7.3.1: in /WEB-INF/tags only consider implicit.tld
234
                    // JSP 7.3.1: in /WEB-INF/tags only consider implicit.tld
234
                    if (path.endsWith("/implicit.tld")) {
235
                    if (path.endsWith("/implicit.tld")) {
236
                        found = true;
235
                        parseTld(path);
237
                        parseTld(path);
236
                    }
238
                    }
237
                } else if (path.endsWith(TLD_EXT)) {
239
                } else if (path.endsWith(TLD_EXT)) {
240
                    found = true;
238
                    parseTld(path);
241
                    parseTld(path);
239
                }
242
                }
240
            }
243
            }
241
        }
244
        }
245
        if(!found){
246
            if (log.isDebugEnabled()) {
247
                log.debug(Localizer.getMessage("jsp.tldCache.noTldInResourcePath", startPath));
248
            }
249
        }else{
250
            if (log.isDebugEnabled()) {
251
                log.debug(Localizer.getMessage("jsp.tldCache.tldInResourcePath", startPath));
252
            }
253
        }
242
    }
254
    }
243
255
244
    /**
256
    /**
Lines 279-285 Link Here
279
291
280
    class TldScannerCallback implements JarScannerCallback {
292
    class TldScannerCallback implements JarScannerCallback {
281
        private boolean foundJarWithoutTld = false;
293
        private boolean foundJarWithoutTld = false;
282
294
        private boolean foundFileWithoutTld = false;
295
        
283
        @Override
296
        @Override
284
        public void scan(JarURLConnection urlConn, String webappPath,
297
        public void scan(JarURLConnection urlConn, String webappPath,
285
                boolean isWebapp) throws IOException {
298
                boolean isWebapp) throws IOException {
Lines 311-316 Link Here
311
                    log.debug(Localizer.getMessage("jsp.tldCache.noTldInJar",
324
                    log.debug(Localizer.getMessage("jsp.tldCache.noTldInJar",
312
                            jarURL.toString()));
325
                            jarURL.toString()));
313
                }
326
                }
327
            }else{
328
                if (log.isDebugEnabled()) {
329
                    log.debug(Localizer.getMessage("jsp.tldCache.tldInJar",
330
                            jarURL.toString()));
331
                }
314
            }
332
            }
315
        }
333
        }
316
334
Lines 321-326 Link Here
321
            if (!metaInf.isDirectory()) {
339
            if (!metaInf.isDirectory()) {
322
                return;
340
                return;
323
            }
341
            }
342
            foundFileWithoutTld = false;
324
            final Path filePath = file.toPath();
343
            final Path filePath = file.toPath();
325
            Files.walkFileTree(metaInf.toPath(), new SimpleFileVisitor<Path>() {
344
            Files.walkFileTree(metaInf.toPath(), new SimpleFileVisitor<Path>() {
326
                @Override
345
                @Override
Lines 331-337 Link Here
331
                            .toLowerCase(Locale.ENGLISH).endsWith(TLD_EXT)) {
350
                            .toLowerCase(Locale.ENGLISH).endsWith(TLD_EXT)) {
332
                        return FileVisitResult.CONTINUE;
351
                        return FileVisitResult.CONTINUE;
333
                    }
352
                    }
334
353
                    
354
                    foundFileWithoutTld = true;
335
                    String resourcePath;
355
                    String resourcePath;
336
                    if (webappPath == null) {
356
                    if (webappPath == null) {
337
                        resourcePath = null;
357
                        resourcePath = null;
Lines 354-359 Link Here
354
                    return FileVisitResult.CONTINUE;
374
                    return FileVisitResult.CONTINUE;
355
                }
375
                }
356
            });
376
            });
377
            if (!foundFileWithoutTld) {
378
                if (log.isDebugEnabled()) {
379
                    log.debug(Localizer.getMessage("jsp.tldCache.noTldInDir",
380
                            file.getAbsolutePath()));
381
                }
382
            }else{
383
                if (log.isDebugEnabled()) {
384
                    log.debug(Localizer.getMessage("jsp.tldCache.tldInDir",
385
                            file.getAbsolutePath()));
386
                }
387
            }
357
        }
388
        }
358
389
359
        @Override
390
        @Override

Return to bug 56438