Class JspClassLoader

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class JspClassLoader
    extends URLClassLoader
    Jasper requires that this class loader be an instance of URLClassLoader. At runtime it uses the URLClassLoader's getURLs method to find jar files that are in turn searched for TLDs. In a webapp these jar files would normally be located in WEB-INF/lib. In the OSGi context, this behaviour is provided by returning the URLs of the jar files contained on the Bundle-ClassPath. Other than jar file tld resources this classloader is not used for loading classes which should be done by the other contained class loaders.

    The rest of the ClassLoader is as follows: 1) Thread-ContextClassLoader (top - parent) -- see ContextFinder 2) Jasper Bundle 3) The Bundle referenced at JSPServlet creation