|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WebContext
A representation of a set of servlets (or portlets) packaged together as a web application archive. Attributes stored within the context are global to all 'lets (but not distributed across a server cluster).
| Method Summary | |
|---|---|
String |
getMimeType(String resourcePath)
Returns the MIME type of the specified file, or null if the MIME type is not known. |
String |
getRealPath(String path)
Returns a String containing the real path for a given virtual path. |
URL |
getResource(String path)
Returns a URL to the resource that is mapped to a specified path. |
InputStream |
getResourceAsStream(String path)
Returns the resource located at the named path as an InputStream
object. |
Set |
getResourcePaths(String path)
Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path matches the supplied path argument. |
| Methods inherited from interface org.apache.tapestry.web.AttributeHolder |
|---|
getAttribute, getAttributeNames, setAttribute |
| Methods inherited from interface org.apache.tapestry.web.InitializationParameterHolder |
|---|
getInitParameterNames, getInitParameterValue |
| Methods inherited from interface org.apache.tapestry.describe.Describable |
|---|
describeTo |
| Method Detail |
|---|
URL getResource(String path)
String getMimeType(String resourcePath)
Set getResourcePaths(String path)
path - partial path used to match the resources, which must start with a '/'
InputStream getResourceAsStream(String path)
InputStream
object.
path - a String specifying the path to the resource
InputStream returned to the servlet,
or null if no resource exists at the specified pathString getRealPath(String path)
String containing the real path for a given virtual path.
For example, the path "/index.html" returns the absolute file path
on the server's filesystem would be served by a request for
"http://host/contextPath/index.html", where contextPath is the
context path of this WebContext.
path - a String specifying a virtual path
String specifying the real path, or null if the
translation cannot be performed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||