Class WebAppClassLoader

java.lang.Object
All Implemented Interfaces:
Closeable, AutoCloseable, ClassVisibilityChecker
Direct Known Subclasses:
CachingWebAppClassLoader, OSGiWebappClassLoader

public class WebAppClassLoader extends URLClassLoader implements ClassVisibilityChecker
ClassLoader for HttpContext.

Specializes URLClassLoader with some utility and file mapping methods.

This loader defaults to the 2.3 servlet spec behavior where non system classes are loaded from the classpath in preference to the parent loader. Java2 compliant loading, where the parent loader always has priority, can be selected with the WebAppContext.setParentLoaderPriority(boolean) method and influenced with WebAppContext.isServerClass(Class) and WebAppContext.isSystemClass(Class).

If no parent class loader is provided, then the current thread context classloader will be used. If that is null then the classloader that loaded this class is used as the parent.