Package org.wso2.carbon.ui
Class JspClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- org.wso2.carbon.ui.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
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoadersystemThe system class loader.
-
Constructor Summary
Constructors Constructor Description JspClassLoader(org.osgi.framework.Bundle bundle, PermissionCollection permissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClassfindClass(String name)protected PermissionCollectiongetPermissions(CodeSource codesource)InputStreamgetResourceAsStream(String name)protected ClassloadClass(String name, boolean resolve)-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findResource, findResources, getURLs, newInstance, newInstance
-
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Field Detail
-
system
protected ClassLoader system
The system class loader.
-
-
Constructor Detail
-
JspClassLoader
public JspClassLoader(org.osgi.framework.Bundle bundle, PermissionCollection permissions)
-
-
Method Detail
-
loadClass
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
findClass
protected Class findClass(String name) throws ClassNotFoundException
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
getPermissions
protected PermissionCollection getPermissions(CodeSource codesource)
- Overrides:
getPermissionsin classURLClassLoader
-
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Overrides:
getResourceAsStreamin classURLClassLoader
-
-