org.apache.naming.resources

Class VirtualDirContext

public class VirtualDirContext extends FileDirContext

Extended FileDirContext implementation that will allow loading of tld files from the META-INF directory (or subdirectories) in classpath. This will fully mimic the behavior of compressed jars also when using unjarred resources. Tld files can be loaded indifferently from WEB-INF webapp dir (or subdirs) or from META-INF dir from jars available in the classpath: using this DirContext implementation you will be able to use unexpanded jars during development and to make any tld in them virtually available to the webapp. Sample context xml configuration: <Context docBase="\webapps\mydocbase"> <Resources className="org.apache.naming.resources.VirtualDirContext" virtualClasspath="\dir\classes;\somedir\somejar.jar"/> </Resources> 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: VirtualDirContext.java 789815 2009-06-30 16:10:09Z rjung $

Author: Fabrizio Giustina

Method Summary
voidsetVirtualClasspath(String path)
virtualClasspath attribute that will be automatically set from the Context virtualClasspath attribute from the context xml file.

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.