Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » core » [javadoc | source]
org.apache.catalina.core
class: ApplicationHttpRequest [javadoc | source]
java.lang.Object
   javax.servlet.ServletRequestWrapper
      javax.servlet.http.HttpServletRequestWrapper
         org.apache.catalina.core.ApplicationHttpRequest

All Implemented Interfaces:
    HttpServletRequest, ServletRequest

Wrapper around a javax.servlet.http.HttpServletRequest that transforms an application request object (which might be the original one passed to a servlet, or might be based on the 2.3 javax.servlet.http.HttpServletRequestWrapper class) back into an internal org.apache.catalina.HttpRequest.

WARNING: Due to Java's lack of support for multiple inheritance, all of the logic in ApplicationRequest is duplicated in ApplicationHttpRequest. Make sure that you keep these two classes in synchronization when making changes!

Nested Class Summary:
protected class  ApplicationHttpRequest.AttributeNamesEnumerator  Utility class used to expose the special attributes as being available as request attributes. 
Field Summary
protected static final  String[] specials    The set of attribute names that are special for request dispatchers. 
protected static  StringManager sm    The string manager for this package. 
protected  Context context    The context for this request. 
protected  String contextPath    The context path for this request. 
protected  boolean crossContext    If this request is cross context, since this changes session accesss behavior. 
protected  Object dispatcherType    The current dispatcher type. 
protected static final  String info    Descriptive information about this implementation. 
protected  Map parameters    The request parameters for this request. This is initialized from the wrapped request, but updates are allowed. 
protected  String pathInfo    The path information for this request. 
protected  String queryString    The query string for this request. 
protected  Object requestDispatcherPath    The current request dispatcher path. 
protected  String requestURI    The request URI for this request. 
protected  String servletPath    The servlet path for this request. 
protected  Session session    The currently active session for this request. 
protected  Object[] specialAttributes    Special attributes. 
Constructor:
 public ApplicationHttpRequest(HttpServletRequest request,
    Context context,
    boolean crossContext) 
    Construct a new wrapped request around the specified servlet request.
    Parameters:
    request - The servlet request being wrapped
Method from org.apache.catalina.core.ApplicationHttpRequest Summary:
copyMap,   getAttribute,   getAttributeNames,   getContextPath,   getInfo,   getParameter,   getParameterMap,   getParameterNames,   getParameterValues,   getPathInfo,   getQueryString,   getRequestDispatcher,   getRequestURI,   getRequestURL,   getServletPath,   getSession,   getSession,   getSpecial,   isRequestedSessionIdValid,   isSpecial,   mergeValues,   parseParameters,   recycle,   removeAttribute,   removeSpecial,   setAttribute,   setContextPath,   setPathInfo,   setQueryParams,   setQueryString,   setRequest,   setRequestURI,   setServletPath,   setSpecial
Methods from javax.servlet.http.HttpServletRequestWrapper:
getAuthType,   getContextPath,   getCookies,   getDateHeader,   getHeader,   getHeaderNames,   getHeaders,   getIntHeader,   getMethod,   getPathInfo,   getPathTranslated,   getQueryString,   getRemoteUser,   getRequestURI,   getRequestURL,   getRequestedSessionId,   getServletPath,   getSession,   getSession,   getUserPrincipal,   isRequestedSessionIdFromCookie,   isRequestedSessionIdFromURL,   isRequestedSessionIdFromUrl,   isRequestedSessionIdValid,   isUserInRole
Methods from javax.servlet.ServletRequestWrapper:
getAttribute,   getAttributeNames,   getCharacterEncoding,   getContentLength,   getContentType,   getInputStream,   getLocalAddr,   getLocalName,   getLocalPort,   getLocale,   getLocales,   getParameter,   getParameterMap,   getParameterNames,   getParameterValues,   getProtocol,   getReader,   getRealPath,   getRemoteAddr,   getRemoteHost,   getRemotePort,   getRequest,   getRequestDispatcher,   getScheme,   getServerName,   getServerPort,   isSecure,   removeAttribute,   setAttribute,   setCharacterEncoding,   setRequest
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.core.ApplicationHttpRequest Detail:
 Map copyMap(Map orig) 
    Perform a shallow copy of the specified Map, and return the result.
 public Object getAttribute(String name) 
    Override the getAttribute() method of the wrapped request.
 public Enumeration getAttributeNames() 
    Override the getAttributeNames() method of the wrapped request.
 public String getContextPath() 
    Override the getContextPath() method of the wrapped request.
 public String getInfo() 
    Return descriptive information about this implementation.
 public String getParameter(String name) 
    Override the getParameter() method of the wrapped request.
 public Map getParameterMap() 
    Override the getParameterMap() method of the wrapped request.
 public Enumeration getParameterNames() 
    Override the getParameterNames() method of the wrapped request.
 public String[] getParameterValues(String name) 
    Override the getParameterValues() method of the wrapped request.
 public String getPathInfo() 
    Override the getPathInfo() method of the wrapped request.
 public String getQueryString() 
    Override the getQueryString() method of the wrapped request.
 public RequestDispatcher getRequestDispatcher(String path) 
    Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.
 public String getRequestURI() 
    Override the getRequestURI() method of the wrapped request.
 public StringBuffer getRequestURL() 
    Override the getRequestURL() method of the wrapped request.
 public String getServletPath() 
    Override the getServletPath() method of the wrapped request.
 public HttpSession getSession() 
    Return the session associated with this Request, creating one if necessary.
 public HttpSession getSession(boolean create) 
    Return the session associated with this Request, creating one if necessary and requested.
 protected int getSpecial(String name) 
    Get a special attribute.
 public boolean isRequestedSessionIdValid() 
    Returns true if the request specifies a JSESSIONID that is valid within the context of this ApplicationHttpRequest, false otherwise.
 protected boolean isSpecial(String name) 
    Is this attribute name one of the special ones that is added only for included servlets?
 protected String[] mergeValues(Object values1,
    Object values2) 
    Merge the two sets of parameter values into a single String array.
  void parseParameters() 
    Parses the parameters of this request. If parameters are present in both the query string and the request content, they are merged.
 public  void recycle() 
    Recycle this request
 public  void removeAttribute(String name) 
    Override the removeAttribute() method of the wrapped request.
 protected boolean removeSpecial(String name) 
    Remove a special attribute.
 public  void setAttribute(String name,
    Object value) 
    Override the setAttribute() method of the wrapped request.
  void setContextPath(String contextPath) 
    Set the context path for this request.
  void setPathInfo(String pathInfo) 
    Set the path information for this request.
  void setQueryParams(String queryString) 
    Save query parameters for this request.
  void setQueryString(String queryString) 
    Set the query string for this request.
  void setRequest(HttpServletRequest request) 
    Set the request that we are wrapping.
  void setRequestURI(String requestURI) 
    Set the request URI for this request.
  void setServletPath(String servletPath) 
    Set the servlet path for this request.
 protected boolean setSpecial(String name,
    Object value) 
    Set a special attribute.