|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.request.RequestContext
public class RequestContext
This class encapsulates all the relevant data for one request cycle of an
ApplicationServlet
. This includes:
HttpServletRequest
HttpServletResponse
HttpSession
This is a limited and crippled version of the RequestContext as it was available in release 3.0,
that exists as a bridge for compatibility only. This saves developers from having to modify their
classes to have the HttpServletRequest
or (preferrably)
WebRequest
injected into their pages, components, or services. It
will be removed in the next release of Tapestry.
Constructor Summary | |
---|---|
RequestContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. |
Method Summary | |
---|---|
javax.servlet.http.HttpSession |
createSession()
Deprecated. Like getSession() , but forces the creation of the HttpSession , if
necessary. |
java.lang.Object |
getAttribute(java.lang.String name)
Deprecated. Convienience method for getting a HttpServletRequest attribute. |
java.lang.String |
getParameter(java.lang.String name)
Deprecated. Returns the named parameter from the HttpServletRequest . |
java.lang.String[] |
getParameterNames()
Deprecated. |
java.lang.String[] |
getParameters(java.lang.String name)
Deprecated. For parameters that are, or are possibly, multi-valued, this method returns all the values as an array of Strings. |
javax.servlet.http.HttpServletRequest |
getRequest()
Deprecated. Returns the request which initiated the current request cycle. |
javax.servlet.http.HttpServletResponse |
getResponse()
Deprecated. |
javax.servlet.http.HttpSession |
getSession()
Deprecated. Returns the HttpSession , if necessary, invoking
HttpServletRequest.getSession(boolean) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Method Detail |
---|
public java.lang.String getParameter(java.lang.String name)
HttpServletRequest
.
Use getParameters(String)
for parameters that may include multiple values.
public java.lang.Object getAttribute(java.lang.String name)
HttpServletRequest
attribute.
public java.lang.String[] getParameters(java.lang.String name)
getParameter(String)
public java.lang.String[] getParameterNames()
public javax.servlet.http.HttpServletRequest getRequest()
getParameter(String)
and getParameters(String)
should be used, rather than
obtaining parameters directly from the request (since the RequestContext handles the
differences between normal and multipart/form requests).
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
HttpSession
, if necessary, invoking
HttpServletRequest.getSession(boolean)
. However, this method will not
create a session.
public javax.servlet.http.HttpSession createSession()
getSession()
, but forces the creation of the HttpSession
, if
necessary.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |