tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject WebappClassLoader, JarScanner and resources
Date Sat, 18 Aug 2012 13:48:08 GMT

In r1374568 I wrote whatever concerns I remembered about resource
handling in Tomcat into TOMCAT-NEXT.txt file.

I have two highlights and two comments/questions:
1) BaseDirContext class.
It internally operates on a different API than DirContext interface.

There is a need to use a simpler interface to define resources and to
query information on them.

2) WebappClassLoader / WebappLoader knows how to handle jars, but it
is not communicated back to DirContext.

As an interim fix:
Maybe change WebappLoader.setRepositories() to update DirContext tree.
What API is to be used for this is TBD.

It would benefit for handling of resource jars in non-unpacked wars.

As further fix:

I think the JAR handling from WebappClassLoader/WebappLoader is
actually a task to be handled by the new resource management
infrastructure (the one that will replace DirContext).

3) As a note,
In StandardJarScanner it should have been sufficient to use the URLs
from URLClassLoader.getURLs(). It lists all jars and class directories
that are part of our web application.

Is there a reason why it has to bother with Servlet API and scanning

The StandardJarScanner.scanClassPath flag could be changed to control
whether the parent classloader is scanned or not.

4) Is there a formal description of the "overlays" feature for Servlet 3.1.

I have a copy of "early draft review" PDF document of the spec from a
June 2012 thread, but I do not see such feature there.

Does it differ much from resource JARs (the ones containing
META-INF/resources directory) of Servlet 3.0?

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message