|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Contains information about the current request, including URLs, schemes, parameters, properties
and attributes. This is essentially a generic version of
HttpServletRequest
. In some cases, certain methods will be
unsupported in some implementations (such as getHeader(String)
for Portlet Tapestry).
Method Summary | |
void |
forward(java.lang.String URL)
Redirects to the indicated URL. |
java.lang.String |
getActivationPath()
Returns the path of the resource which activated this request (this is the equivalent of the servlet path for a servlet request). |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request. |
java.lang.String |
getHeader(java.lang.String name)
Returns the value of the specified request header. |
java.util.Locale |
getLocale()
Returns the preferred locale to which content should be localized, as specified by the client or by the container. |
java.util.List |
getParameterNames()
Returns the names of all query parameters for this request. |
java.lang.String |
getParameterValue(java.lang.String parameterName)
Returns a parameter value. |
java.lang.String[] |
getParameterValues(java.lang.String parameterName)
Returns all parameter values for a particular parameter name. |
java.lang.String |
getPathInfo()
Return any additional path info beyond the servlet path itself. |
java.lang.String |
getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
java.lang.String |
getRequestURI()
Returns the path portion of the request which triggered this request. |
java.lang.String |
getScheme()
Returns the name of the scheme used to make this request. |
java.lang.String |
getServerName()
Returns the host name of the server that received the request. |
int |
getServerPort()
Returns the port number on which this request was received. |
WebSession |
getSession(boolean create)
Returns the current WebSession associated with this request, possibly creating it if
it does not already exist. |
java.security.Principal |
getUserPrincipal()
Returns a java.security.Principal object containing the name of the current authenticated user. |
boolean |
isUserInRole(java.lang.String role)
* Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
Methods inherited from interface org.apache.tapestry.web.AttributeHolder |
getAttribute, getAttributeNames, setAttribute |
Methods inherited from interface org.apache.tapestry.describe.Describable |
describeTo |
Method Detail |
public java.util.List getParameterNames()
public java.lang.String getParameterValue(java.lang.String parameterName)
parameterName
- name of parameter to obtain
getParameterValues(String)
public java.lang.String[] getParameterValues(java.lang.String parameterName)
The caller should not modify the returned value.
parameterName
- name of parameter to obtain
getParameterValue(String)
public java.lang.String getContextPath()
public WebSession getSession(boolean create)
WebSession
associated with this request, possibly creating it if
it does not already exist. If create is false and the request has no valid session, this
method returns null. To make sure the session is properly maintained, you must call this
method before the response is committed.
create
- if true, the session will be created and returned if it does not already existpublic java.lang.String getScheme()
public java.lang.String getServerName()
IRequestDecoder
public int getServerPort()
public java.lang.String getRequestURI()
Note: portlets do not know their request URI.
public void forward(java.lang.String URL)
public java.lang.String getActivationPath()
public java.lang.String getPathInfo()
public java.util.Locale getLocale()
public java.lang.String getHeader(java.lang.String name)
name
- the name of the header to retrieve
public java.lang.String getRemoteUser()
public java.security.Principal getUserPrincipal()
public boolean isUserInRole(java.lang.String role)
role
- a String specifying the name of the role
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |