|
||||||||||
| 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 | |
|---|---|
java.lang.String |
getMimeType(java.lang.String resourcePath)
Returns the MIME type of the specified file, or null if the MIME type is not known. |
java.lang.String |
getRealPath(java.lang.String path)
Returns a String containing the real path for a given virtual path. |
java.net.URL |
getResource(java.lang.String path)
Returns a URL to the resource that is mapped to a specified path. |
java.io.InputStream |
getResourceAsStream(java.lang.String path)
Returns the resource located at the named path as an InputStream
object. |
java.util.Set |
getResourcePaths(java.lang.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 |
|---|
java.net.URL getResource(java.lang.String path)
java.lang.String getMimeType(java.lang.String resourcePath)
java.util.Set getResourcePaths(java.lang.String path)
path - partial path used to match the resources, which must start with a '/'
java.io.InputStream getResourceAsStream(java.lang.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 pathjava.lang.String getRealPath(java.lang.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 | |||||||||