org.apache.catalina.loader

Class VirtualWebappLoader

public class VirtualWebappLoader extends WebappLoader

Simple webapp classloader that allows a customized classpath to be added through configuration in context xml. Any additional classpath entry will be added to the default webapp classpath, making easy to emulate a standard webapp without the need for assembly all the webapp dependencies as jars in WEB-INF/lib. <Context docBase="\webapps\mydocbase"> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="\dir\classes;\somedir\somejar.jar"/> </Context> This is not meant to be used for production. Its meant to ease development with IDE's without the need for fully republishing jars in WEB-INF/lib

Version: $Id: VirtualWebappLoader.java 821672 2009-10-05 03:14:25Z kkolinko $

Author: Fabrizio Giustina

Constructor Summary
VirtualWebappLoader()
Construct a new WebappLoader with no defined parent class loader (so that the actual parent will be the system class loader).
VirtualWebappLoader(ClassLoader parent)
Construct a new WebappLoader with the specified class loader to be defined as the parent of the ClassLoader we ultimately create.
Method Summary
voidsetVirtualClasspath(String path)
virtualClasspath attribute that will be automatically set from the Context virtualClasspath attribute from the context xml file.

Constructor Detail

VirtualWebappLoader

public VirtualWebappLoader()
Construct a new WebappLoader with no defined parent class loader (so that the actual parent will be the system class loader).

VirtualWebappLoader

public VirtualWebappLoader(ClassLoader parent)
Construct a new WebappLoader with the specified class loader to be defined as the parent of the ClassLoader we ultimately create.

Parameters: parent The parent class loader

Method Detail

setVirtualClasspath

public void setVirtualClasspath(String path)
virtualClasspath attribute that will be automatically set from the Context virtualClasspath attribute from the context xml file.

Parameters: path ; separated list of path elements.

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.