Class WebAppClassLoader

java.lang.Object
All Implemented Interfaces:
Closeable, AutoCloseable, org.eclipse.jetty.util.ClassVisibilityChecker
Direct Known Subclasses:
CachingWebAppClassLoader

@ManagedObject public class WebAppClassLoader extends URLClassLoader implements org.eclipse.jetty.util.ClassVisibilityChecker
ClassLoader for Http Context.

Specializes URLClassLoader with some utility and file mapping methods.

This loader implements the Servlet specification behavior that may invert the normal Java classloader parent priority behaviour. The ClassVisibilityChecker API of the WebAppClassLoader.Context implementation is used to determine which classes from the parent classloader are hidden from the context, and which are protected from being overridden by the context.

Java compliant loading, where the parent loader always has priority, can be selected with the WebAppClassLoader.Context.isParentLoaderPriority() method.