ASF Bugzilla – Attachment 32702 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-Tomcat7
56438_fix.diff (text/plain), 5.08 KB, created by
VIN
on 2015-04-30 08:47:11 UTC
(
hide
)
Description:
Fix for adding debug log message for positive matches of tld-Tomcat7
Filename:
MIME Type:
Creator:
VIN
Created:
2015-04-30 08:47:11 UTC
Size:
5.08 KB
patch
obsolete
>Index: java/org/apache/catalina/startup/LocalStrings.properties >=================================================================== >--- java/org/apache/catalina/startup/LocalStrings.properties (revision 1676707) >+++ java/org/apache/catalina/startup/LocalStrings.properties (working copy) >@@ -122,12 +122,16 @@ > hostConfig.undeployVersion=Undeploying old version of context [{0}] which has no active session > tldConfig.addListeners=Adding {0} listeners from TLD files > tldConfig.cce=Lifecycle event data object {0} is not a Context >+tldConfig.noTldInResourcePath=No TLD files were found in resource path [{0}]. >+tldConfig.tldInResourcePath=TLD files were found in resource path [{0}]. > tldConfig.dirFail=Failed to process directory [{0}] for TLD files > tldConfig.dirScan=Scanning for TLD files in directory [{0}] > tldConfig.noTldInDir=No TLD files were found in directory [{0}]. >+tldConfig.tldInDir=TLD files were found in directory [{0}]. > tldConfig.execute=Error processing TLD files for context with name [{0}] > tldConfig.jarFail=Failed to process JAR [{0}] for TLD files > 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. >+tldConfig.tldInJar=TLD files were found in JAR [{0}]. > 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. > tldConfig.webinfFail=Failed to process TLD found at [{0}] > tldConfig.webinfScan=Scanning WEB-INF for TLD files in [{0}] >Index: java/org/apache/catalina/startup/TldConfig.java >=================================================================== >--- java/org/apache/catalina/startup/TldConfig.java (revision 1676707) >+++ java/org/apache/catalina/startup/TldConfig.java (working copy) >@@ -263,7 +263,7 @@ > > // Stage 3a - TLDs under WEB-INF (not lib or classes) > tldScanResourcePaths(WEB_INF); >- >+ > // Stages 3b & 4 > JarScanner jarScanner = context.getJarScanner(); > >@@ -388,8 +388,9 @@ > * > * Keep in sync with o.a.j.comiler.TldLocationsCache > */ >- private void tldScanResourcePaths(String startPath) { >+ private boolean tldScanResourcePaths(String startPath) { > >+ boolean isFound = false; > if (log.isTraceEnabled()) { > log.trace(sm.getString("tldConfig.webinfScan", startPath)); > } >@@ -411,6 +412,7 @@ > !path.endsWith("implicit.tld")) { > continue; > } >+ isFound = true; > InputStream stream = ctxt.getResourceAsStream(path); > try { > XmlErrorHandler handler = tldScanStream(stream); >@@ -432,6 +434,17 @@ > } > } > } >+ >+ if(!isFound){ >+ if (log.isDebugEnabled()) { >+ log.debug(sm.getString("tldConfig.noTldInResourcePath", startPath)); >+ } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(sm.getString("tldConfig.tldInResourcePath", startPath)); >+ } >+ } >+ return isFound; > } > > /* >@@ -455,7 +468,7 @@ > tldScanDir(fileList[i]); > } else if (fileList[i].getAbsolutePath().endsWith(TLD_EXT)) { > InputStream stream = null; >- isFound = true; >+ isFound = true; > try { > stream = new FileInputStream(fileList[i]); > XmlErrorHandler handler = tldScanStream(stream); >@@ -480,6 +493,11 @@ > if (log.isDebugEnabled()) { > log.debug(sm.getString("tldConfig.noTldInDir", start.getAbsolutePath())); > } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(sm.getString("tldConfig.tldInDir", >+ start.getAbsolutePath())); >+ } > } > return isFound; > } >@@ -506,7 +524,7 @@ > while (entryName != null) { > if (entryName.startsWith("META-INF/") && > entryName.endsWith(".tld")) { >- isFound = true; >+ isFound = true; > is = null; > try { > is = jar.getEntryInputStream(); >@@ -530,6 +548,11 @@ > log.debug(sm.getString("tldConfig.noTldInJar", > jarConn.getURL().getFile())); > } >+ }else{ >+ if (log.isDebugEnabled()) { >+ log.debug(sm.getString("tldConfig.tldInJar", >+ jarConn.getURL().getFile())); >+ } > } > } catch (IOException ioe) { > log.warn(sm.getString("tldConfig.jarFail", jarConn.getURL()), ioe);
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