|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.web.ServletWebRequest
public class ServletWebRequest
Adapter from HttpServletRequest to
WebRequest.
| Constructor Summary | |
|---|---|
ServletWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
|
| Method Summary | |
|---|---|
void |
describeTo(DescriptionReceiver receiver)
Invoked to have the receiver describe itself (largely in terms of properties and values). |
void |
forward(java.lang.String URL)
Redirects to the indicated URL. |
java.lang.String |
getActivationPath()
Returns HttpServletRequest.getServletPath(). |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the named object, or null if no attribute has been stored with the given name. |
java.util.List |
getAttributeNames()
Returns a list of all known attributes in ascending alphabetical order. |
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 WebSessionassociated 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". |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute)
Updates the attribute, replacing (or removing) its value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletWebRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
| Method Detail |
|---|
public java.util.List getParameterNames()
WebRequest
getParameterNames in interface WebRequestpublic java.lang.String getParameterValue(java.lang.String parameterName)
WebRequest
getParameterValue in interface WebRequestparameterName - name of parameter to obtain
WebRequest.getParameterValues(String)public java.lang.String[] getParameterValues(java.lang.String parameterName)
WebRequestThe caller should not modify the returned value.
getParameterValues in interface WebRequestparameterName - name of parameter to obtain
WebRequest.getParameterValue(String)public java.lang.String getContextPath()
WebRequest
getContextPath in interface WebRequestpublic WebSession getSession(boolean create)
WebRequestWebSessionassociated 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.
getSession in interface WebRequestcreate - if true, the session will be created and returned if it does not already existpublic java.util.List getAttributeNames()
AttributeHolder
getAttributeNames in interface AttributeHolderpublic java.lang.Object getAttribute(java.lang.String name)
AttributeHolder
getAttribute in interface AttributeHolder
public void setAttribute(java.lang.String name,
java.lang.Object attribute)
AttributeHolderWebSession
attribute in a clustered application).
setAttribute in interface AttributeHoldername - the name of the attribute to updateattribute - the new value for the attribute, or null to delete the attribute entirely.public java.lang.String getScheme()
WebRequest
getScheme in interface WebRequestpublic java.lang.String getServerName()
WebRequest
getServerName in interface WebRequestIRequestDecoderpublic int getServerPort()
WebRequest
getServerPort in interface WebRequestpublic java.lang.String getRequestURI()
WebRequestNote: portlets do not know their request URI.
getRequestURI in interface WebRequestpublic void forward(java.lang.String URL)
WebRequest
forward in interface WebRequestpublic java.lang.String getActivationPath()
HttpServletRequest.getServletPath().
getActivationPath in interface WebRequestpublic java.lang.String getPathInfo()
WebRequest
getPathInfo in interface WebRequestpublic java.util.Locale getLocale()
WebRequest
getLocale in interface WebRequestpublic void describeTo(DescriptionReceiver receiver)
DescribabletoString().
describeTo in interface Describablepublic java.lang.String getHeader(java.lang.String name)
WebRequest
getHeader in interface WebRequestname - the name of the header to retrieve
public java.lang.String getRemoteUser()
WebRequest
getRemoteUser in interface WebRequestpublic java.security.Principal getUserPrincipal()
WebRequest
getUserPrincipal in interface WebRequestpublic boolean isUserInRole(java.lang.String role)
WebRequest
isUserInRole in interface WebRequestrole - a String specifying the name of the role
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||