servletunit.struts
Class StrutsRequestWrapper

java.lang.Object
  extended byHttpServletRequestWrapper
      extended byservletunit.struts.StrutsRequestWrapper

public class StrutsRequestWrapper
extends HttpServletRequestWrapper

A wrapper for the HttpServletRequest class. This is used in CactusStrutsTestCase so that we can add our own request parameters outside of the beginXXX and endXXX methods. This allows us to to use the ActionServlet as a black box, rather than mimic its behavior as was previously the case.

See Also:
Serialized Form

Constructor Summary
StrutsRequestWrapper(HttpServletRequestWrapper request)
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
           
 void addParameter(java.lang.String name, java.lang.String[] values)
           
 void clearRequestParameters()
           
 java.lang.String getParameter(java.lang.String name)
           
 java.util.Map getParameterMap()
           
 java.util.Enumeration getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String name)
           
 java.lang.String getPathInfo()
           
 java.lang.String getServletPath()
           
 void setPathInfo(java.lang.String pathInfo)
           
 void setServletPath(java.lang.String servletPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrutsRequestWrapper

public StrutsRequestWrapper(HttpServletRequestWrapper request)
Method Detail

setPathInfo

public void setPathInfo(java.lang.String pathInfo)

getPathInfo

public java.lang.String getPathInfo()

setServletPath

public void setServletPath(java.lang.String servletPath)

getServletPath

public java.lang.String getServletPath()

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)

getParameterNames

public java.util.Enumeration getParameterNames()

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String[] values)

getParameterMap

public java.util.Map getParameterMap()

clearRequestParameters

public void clearRequestParameters()


Copyright © Deryl Seale All Rights Reserved.