|
||||||||||
| 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 | |
|---|---|
Object |
getAttribute(String name)
Returns an attribute previously stored into the context with the given name. |
List<String> |
getAttributeNames()
Returns the names of all attributes of the context, sorted alphabetically. |
String |
getInitParameter(String name)
Returns an initial parameter value defined by servlet. |
String |
getMimeType(String file)
Returns the MIME content type of the specified file, or null if no content type is known. |
File |
getRealFile(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). |
URL |
getResource(String path)
Returns a URL to a resource stored within the context. |
List<String> |
getResourcePaths(String path)
Looks for resources within the web application within the supplied path. |
| Method Detail |
|---|
URL getResource(String path)
path - to the resource (with a leading slash)
File getRealFile(String path)
getResource(String).
path - to the resource (with a leading slash)
String getInitParameter(String name)
List<String> getResourcePaths(String path)
path - to search for (should start with a leading slash)
Object getAttribute(String name)
name - used to retrieve the attribute
List<String> getAttributeNames()
String getMimeType(String file)
file - name of file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||