|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Context
An API agnostic version of ServletContext
, used to bridge the gaps between the Servlet API and
the Portlet API.
Method Summary | |
---|---|
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)
Attempts to find the actual file, on the file system, that would be provided by the servlet container for the given path (which must start with a leading slash). |
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. |
Method Detail |
---|
java.net.URL getResource(java.lang.String path)
path
- to the resource (with a leading slash)
java.io.File getRealFile(java.lang.String path)
getResource(String)
.
path
- to the resource (with a leading slash)
java.lang.String getInitParameter(java.lang.String name)
java.util.List<java.lang.String> getResourcePaths(java.lang.String path)
path
- to search for (should start with a leading slash)
java.lang.Object getAttribute(java.lang.String name)
name
- used to retrieve the attribute
java.util.List<java.lang.String> getAttributeNames()
java.lang.String getMimeType(java.lang.String file)
file
- name of file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |