org.openqa.jetty.http
Class ContextLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.openqa.jetty.http.ContextLoader
public class ContextLoader
- extends URLClassLoader
ClassLoader for HttpContext.
Specializes URLClassLoader with some utility and file mapping
methods.
This loader defaults to the 2.3 servlet spec behaviour 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 setJava2Complient method.
- Version:
- $Id: ContextLoader.java,v 1.37 2006/01/09 07:26:12 gregwilkins Exp $
- Author:
- Greg Wilkins (gregw)
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
ContextLoader
public ContextLoader(HttpContext context,
String classPath,
ClassLoader parent,
PermissionCollection permisions)
throws MalformedURLException,
IOException
- Constructor.
- Parameters:
classPath
- Comma separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'.
- Throws:
IOException
MalformedURLException
setJava2Compliant
public void setJava2Compliant(boolean compliant)
- Set Java2 compliant status.
- Parameters:
compliant
-
isJava2Compliant
public boolean isJava2Compliant()
toString
public String toString()
- Overrides:
toString
in class Object
getPermissions
public PermissionCollection getPermissions(CodeSource cs)
- Overrides:
getPermissions
in class URLClassLoader
loadClass
public Class loadClass(String name)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
loadClass
protected Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
getResource
public URL getResource(String name)
- Overrides:
getResource
in class ClassLoader
isServerPath
public boolean isServerPath(String name)
isSystemPath
public boolean isSystemPath(String name)
destroy
public void destroy()
Copyright © 2012. All Rights Reserved.