org.apache.cactus.server
class HttpServletRequestWrapper

java.lang.Object
  |
  +--org.apache.cactus.server.AbstractHttpServletRequestWrapper
        |
        +--org.apache.cactus.server.HttpServletRequestWrapper
All Implemented Interfaces:
HttpServletRequest, ServletRequest
Known Advisors:
LogAspect

public class HttpServletRequestWrapper
extends AbstractHttpServletRequestWrapper

Encapsulation class for the Servlet 2.3 API HttpServletRequest. This is an implementation that delegates all the call to the HttpServletRequest object passed in the constructor except for some overiden methods which are use to simulate a URL. This is to be able to simulate any URL that would have been used to call the test method : if this was not done, the URL that would be returned (by calling the getRequestURI() method or others alike) would be the URL of the Cactus redirector servlet and not a URL that the test case want to simulate.

Version:
$Id: HttpServletRequestWrapper.java,v 1.4 2002/07/21 12:09:16 vmassol Exp $
Author:
Vincent Massol

Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
HttpServletRequestWrapper(HttpServletRequest theRequest, ServletURL theURL)
           
 
Method Summary
 Map getParameterMap()
           
 StringBuffer getRequestURL()
           
 void setCharacterEncoding(String theEnvironment)
           Affected by: LogAspect
 
Methods inherited from class org.apache.cactus.server.AbstractHttpServletRequestWrapper
getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocale, getLocales, getMethod, getOriginalRequest, getParameter, getParameterNames, getParameterValues, getPathInfo, getPathTranslated, getProtocol, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemoteUser, getRequestDispatcher, getRequestURI, getRequestedSessionId, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdFromUrl, isRequestedSessionIdValid, isSecure, isUserInRole, removeAttribute, setAttribute, setRemoteHostName, setRemoteIPAddress
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServletRequestWrapper

public HttpServletRequestWrapper(HttpServletRequest theRequest,
                                 ServletURL theURL)
Method Detail

getParameterMap

public Map getParameterMap()

getRequestURL

public StringBuffer getRequestURL()

setCharacterEncoding

public void setCharacterEncoding(String theEnvironment)
                          throws java.io.UnsupportedEncodingException
Affected by:
around() in LogAspect.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.