public class WebApplicationResource extends AbstractResource
| Constructor and Description |
|---|
WebApplicationResource(javax.servlet.ServletContext context,
String path)
Creates a new WebApplicationResource which serves the resource at the
given path relative to the given ServletContext.
|
WebApplicationResource(javax.servlet.ServletContext context,
String mimetype,
String path)
Creates a new WebApplicationResource which serves the resource at the
given path relative to the given ServletContext.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
asStream()
Returns an InputStream which reads the contents of this resource,
starting with the first byte.
|
getLastModified, getMimeTypepublic WebApplicationResource(javax.servlet.ServletContext context,
String mimetype,
String path)
context - The ServletContext to use when reading the resource.mimetype - The mimetype of the resource.path - The path of the resource relative to the given ServletContext.public WebApplicationResource(javax.servlet.ServletContext context,
String path)
context - The ServletContext to use when reading the resource and deriving the
mimetype.path - The path of the resource relative to the given ServletContext.public InputStream asStream()
ResourceCopyright © 2015. All rights reserved.