On 08/04/2015 11:20, Pravallika Peddi wrote: > Hi Mark, > > > Highlighted code is the Fix to add summary message to *Tomcat7.0*:
Patches should be in diff -u format and are best attached to bug reports. Mark > > > In org.apache.catalina.startup.TldConfig.java à > > > > a) Return a Boolean variable from tldScanJar(JarURLConnection > jarConn)method which indicates tld found or not. > > b) In TldJarScannerCallback inner class à add code a sbelow: > > > > boolean isFound = false; > > > > @Override > > public void scan(JarURLConnection urlConn) throws IOException { > > log.info <http://log.info>("Scanning jar in scan function:" + > urlConn); > > isFound = tldScanJar(urlConn); > > } > > > > @Override > > public void scan(File file) { > > File metaInf = new File(file, "META-INF"); > > if (metaInf.isDirectory()) { > > isFound = tldScanDir(metaInf); > > } > > } > > > > private boolean scanFoundNoTLDs() { > > log.info <http://log.info>("tldFound at end:" + isFound); > > return !isFound; > > } > > > > > > c) In execute() method add below code: > > > > TldJarScannerCallback objCallBack = *new*TldJarScannerCallback(); > > jarScanner.scan(context.getServletContext(), > > context.getLoader().getClassLoader(), > > objCallBack, /noTldJars/); > > > > *if*(objCallBack.scanFoundNoTLDs()){ > > /log/.info(/sm/.getString("tldConfig.noTldSummary")); > > } > > > > I tested the fix and Summary message is getting added to log. > > Attached the java file that contains these changes. > > Please review and let me know if the fix is ok or not. > > > I will send another mail for pluggability scan fix details for Tomcat7.0 > > > Thanks, > > Pravallika (VIN) > > > On Sun, Mar 29, 2015 at 4:07 AM, Mark Thomas <ma...@apache.org > <mailto:ma...@apache.org>> wrote: > > On 26/03/2015 13:27, Pravallika Peddi wrote: > > <snip/> > > > 1) As mentioned in bug, in Tomcat7.0 catalina.properties file first > 4 > > default jars(except jdom.jar) are missing: > > commons-discovery-*.jar,commons-el-*.jar,commons-net-*.jar > > > > We can add them under > > “tomcat.util.scan.DefaultJarScanner.jarsToSkip” > > jdom.jar isn't covered by the existing filters. > > <snip/> > > > 3) 3) So I am planning to provide a fix as below for Tomcat > 7.0 > > TLD scan: > > Looks OK so far. > > <snip/> > > > But in Tomcat 7.0, StandardJarScanner.scan method only called from both > > TldConfig.java and ContextConfig.java. So I am afraid I cannot add the > > Summary message in Tomcat7.0. When User enables FINE level then only > they > > can see the noTldInJar messages > > Look again. It certainly is possible to add the summary message for TLDs > in Tomcat 7. > > > 4) Tomcat7.0 ContextConfig scan is taking less time, hence I feel we can > > ignore it for now. > > I disagree. The pluggability scanning can add a significant start-up > delay to web applications. The reason that the bug report was opened in > the first place is the time taken for the pluggability scans. > > > Please let me know your opinion. > > I think you have some more research to do. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > <mailto:dev-unsubscr...@tomcat.apache.org> > For additional commands, e-mail: dev-h...@tomcat.apache.org > <mailto:dev-h...@tomcat.apache.org> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org