org.mortbay.http
Class ContextLoader
URLClassLoader
org.mortbay.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.
$Id: ContextLoader.java,v 1.36 2005/11/19 09:04:53 gregwilkins Exp $
ContextLoader
public ContextLoader(HttpContext context,
String classPath,
ClassLoader parent,
PermissionCollection permisions)
throws MalformedURLException,
IOException
Constructor.
classPath
- Comma separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'.
destroy
public void destroy()
getPermissions
public PermissionCollection getPermissions(CodeSource cs)
getResource
public URL getResource(String name)
isJava2Compliant
public boolean isJava2Compliant()
isServerPath
public boolean isServerPath(String name)
isSystemPath
public boolean isSystemPath(String name)
loadClass
public Class loadClass(String name)
throws ClassNotFoundException
loadClass
protected Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
setJava2Compliant
public void setJava2Compliant(boolean compliant)
Set Java2 compliant status.
toString
public String toString()
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.