org.spicefactory.lib.resource
Class WebAppResource

java.lang.Object
  extended by org.spicefactory.lib.resource.AbstractResource
      extended by org.spicefactory.lib.resource.WebAppResource
All Implemented Interfaces:
Resource

public class WebAppResource
extends AbstractResource

Resource implementation that uses the ServletContext of a web application to load the resource.

Author:
Jens Halm

Constructor Summary
WebAppResource(String path, ServletContext context)
          Creates a new web application resource for the given path and ServletContext.
 
Method Summary
 InputStream getInputStream()
          Creates an InputStream for this Resource.
 
Methods inherited from class org.spicefactory.lib.resource.AbstractResource
getPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppResource

public WebAppResource(String path,
                      ServletContext context)
Creates a new web application resource for the given path and ServletContext.

Parameters:
path - the path of the resource
context - the ServletContext to be used for loading the resource
Method Detail

getInputStream

public InputStream getInputStream()
Description copied from interface: Resource
Creates an InputStream for this Resource.

Returns:
an InputStream for this Resource