2014-08-08 15:35 GMT+04:00 Luc <useyour.m...@gmail.com>: > Hello, > > After a Tomcat 6.0.36 to 7.0.54 migration, I added to my global > 'context.xml' the configuration: > <JarScanner scanClassPath="false" /> > > Which excluded (as I readed in the docs, > http://tomcat.apache.org/tomcat-7.0-doc/config/jar-scanner.html#Standard_Implementation) > the scaning of system classpath, and shared and common classloader, but not > the webapp classloader (WEB-INF/lib). > It worked, and was what I was looking for. > > Yesterday I discovered the 'VirtualWebappLoader' feature, which fit my > needs: add .jar's to webapp classloading, and not to other classloader / > classpath, but outside the WEB-INF/lib folder. > Those .jar files contains some resources (facelets '.xhtml') which I though > that ServletContext should find them, as they where found when the .jar's > are located at WEB-INF/lib. > But they are note being found when using ServletContext.getResource() > method. > > Is this the expected behaviour?
Yes, this is expected. > I mean, 'JarScanner' docs says that webapp classloading will be scanned > anyway. > VirtualWebappLoader only adds the jars into Webapp's classpath They are not citizens of WEB-INF/lib. You have disabled classpath scanning so this is as expected > And in the other hand the loader docs ( > http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html) says that > resources loaded are considered as a webapp resources. But they are not > being scanned. No, it does not say that. It says "Java classes and resources". It does not say "webapp resources". It is ClassLoader.getResource(). It is not ServletContext.getResource(). > > I'm using Tomcat 7.0.54, Java 6, on a Windows machine. > I have an example webapp (deployable with Eclipse) which reproduces this > issue, which I can upload later. > Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org