public class PageTesterContext extends java.lang.Object implements Context
| Constructor and Description |
|---|
PageTesterContext(java.lang.String contextRoot) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns an attribute previously stored into the context with the given name.
|
java.util.List<java.lang.String> |
getAttributeNames()
Returns the names of all attributes of the context, sorted alphabetically.
|
java.lang.String |
getInitParameter(java.lang.String name)
Returns an initial parameter value defined by servlet.
|
java.lang.String |
getMimeType(java.lang.String file)
Returns the MIME content type of the specified file, or null if no content type is known.
|
java.io.File |
getRealFile(java.lang.String path)
Always returns null.
|
java.net.URL |
getResource(java.lang.String path)
Returns a URL to a resource stored within the context.
|
java.util.List<java.lang.String> |
getResourcePaths(java.lang.String path)
Looks for resources within the web application within the supplied path.
|
public PageTesterContext(java.lang.String contextRoot)
public java.lang.String getInitParameter(java.lang.String name)
ContextgetInitParameter in interface Contextpublic java.net.URL getResource(java.lang.String path)
ContextgetResource in interface Contextpath - to the resource (with a leading slash)public java.util.List<java.lang.String> getResourcePaths(java.lang.String path)
ContextgetResourcePaths in interface Contextpath - to search for (should start with a leading slash)public java.lang.Object getAttribute(java.lang.String name)
ContextgetAttribute in interface Contextname - used to retrieve the attributepublic java.util.List<java.lang.String> getAttributeNames()
ContextgetAttributeNames in interface Contextpublic java.lang.String getMimeType(java.lang.String file)
ContextgetMimeType in interface Contextfile - name of filepublic java.io.File getRealFile(java.lang.String path)
getRealFile in interface Contextpath - to the resource (with a leading slash)${project.version} - Copyright © 2003-2015 The Apache Software Foundation.