ASF Bugzilla – Attachment 32720 Details for
Bug 56438
If jar scan does not find context config or TLD config, log a message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for adding debug log message for positive matches of tld-Tomcat8
56438_fix-Tomcat8.diff (text/plain), 4.64 KB, created by
VIN
on 2015-05-07 09:54:23 UTC
(
hide
)
Description:
Fix for adding debug log message for positive matches of tld-Tomcat8
Filename:
MIME Type:
Creator:
VIN
Created:
2015-05-07 09:54:23 UTC
Size:
4.64 KB
patch
obsolete
>Index: java/org/apache/jasper/resources/LocalStrings.properties >=================================================================== >--- java/org/apache/jasper/resources/LocalStrings.properties (revision 1678140) >+++ java/org/apache/jasper/resources/LocalStrings.properties (working copy) >@@ -389,7 +389,12 @@ > > xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream > >+jsp.tldCache.noTldInResourcePath=No TLD files were found in resource path [{0}]. >+jsp.tldCache.tldInResourcePath=TLD files were found in resource path [{0}]. >+jsp.tldCache.noTldInDir=No TLD files were found in directory [{0}]. >+jsp.tldCache.tldInDir=TLD files were found in directory [{0}]. > 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. >+jsp.tldCache.tldInJar=TLD files were found in JAR [{0}]. > 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. > > #ELInterpreter >Index: java/org/apache/jasper/servlet/TldScanner.java >=================================================================== >--- java/org/apache/jasper/servlet/TldScanner.java (revision 1678140) >+++ java/org/apache/jasper/servlet/TldScanner.java (working copy) >@@ -220,6 +220,7 @@ > protected void scanResourcePaths(String startPath) > throws IOException, SAXException { > >+ boolean found = false; > Set<String> dirList = context.getResourcePaths(startPath); > if (dirList != null) { > for (String path : dirList) { >@@ -232,13 +233,24 @@ > } 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.noTldInResourcePath", startPath)); >+ } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(Localizer.getMessage("jsp.tldCache.tldInResourcePath", startPath)); >+ } >+ } > } > > /** >@@ -279,7 +291,8 @@ > > class TldScannerCallback implements JarScannerCallback { > private boolean foundJarWithoutTld = false; >- >+ private boolean foundFileWithoutTld = false; >+ > @Override > public void scan(JarURLConnection urlConn, String webappPath, > boolean isWebapp) throws IOException { >@@ -311,6 +324,11 @@ > log.debug(Localizer.getMessage("jsp.tldCache.noTldInJar", > jarURL.toString())); > } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(Localizer.getMessage("jsp.tldCache.tldInJar", >+ jarURL.toString())); >+ } > } > } > >@@ -321,6 +339,7 @@ > if (!metaInf.isDirectory()) { > return; > } >+ foundFileWithoutTld = false; > final Path filePath = file.toPath(); > Files.walkFileTree(metaInf.toPath(), new SimpleFileVisitor<Path>() { > @Override >@@ -331,7 +350,8 @@ > .toLowerCase(Locale.ENGLISH).endsWith(TLD_EXT)) { > return FileVisitResult.CONTINUE; > } >- >+ >+ foundFileWithoutTld = true; > String resourcePath; > if (webappPath == null) { > resourcePath = null; >@@ -354,6 +374,17 @@ > return FileVisitResult.CONTINUE; > } > }); >+ if (!foundFileWithoutTld) { >+ if (log.isDebugEnabled()) { >+ log.debug(Localizer.getMessage("jsp.tldCache.noTldInDir", >+ file.getAbsolutePath())); >+ } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(Localizer.getMessage("jsp.tldCache.tldInDir", >+ file.getAbsolutePath())); >+ } >+ } > } > > @Override
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56438
:
32639
|
32694
|
32702
|
32719
| 32720 |
32746
|
32747
|
32748