org.apache.tapestry.request
Class RequestContext

java.lang.Object
  extended byorg.apache.tapestry.request.RequestContext

Deprecated. To be removed in 4.1. Use injection to gain access to the necessary objects.

public class RequestContext
extends java.lang.Object

This class encapsulates all the relevant data for one request cycle of an ApplicationServlet. This includes:

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.

Author:
Howard Lewis Ship

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 HttpServletRequestattribute.
 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

RequestContext

public RequestContext(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
Deprecated. 
Method Detail

getParameter

public java.lang.String getParameter(java.lang.String name)
Deprecated. 
Returns the named parameter from the HttpServletRequest.

Use getParameters(String)for parameters that may include multiple values.


getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Deprecated. 
Convienience method for getting a HttpServletRequestattribute.

Since:
2.3

getParameters

public 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.

See Also:
getParameter(String)

getParameterNames

public java.lang.String[] getParameterNames()
Deprecated. 

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Deprecated. 
Returns the request which initiated the current request cycle. Note that the methods 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).


getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Deprecated. 

getSession

public javax.servlet.http.HttpSession getSession()
Deprecated. 
Returns the HttpSession, if necessary, invoking HttpServletRequest.getSession(boolean). However, this method will not create a session.


createSession

public javax.servlet.http.HttpSession createSession()
Deprecated. 
Like getSession(), but forces the creation of the HttpSession, if necessary.