FileDocCategorySizeDatePackage
StrutsMockHttpServletRequest.javaAPI DocExample5246Mon Jul 23 13:26:16 BST 2007org.apache.struts2.views.jsp

StrutsMockHttpServletRequest

public class StrutsMockHttpServletRequest extends com.mockobjects.servlet.MockHttpServletRequest
StrutsMockHttpServletRequest

Fields Summary
Locale
locale
private Map
attributes
private Map
parameterMap
private String
context
private String
pathInfo
private String
queryString
private String
requestURI
private String
scheme
private String
serverName
private int
serverPort
private String
encoding
private String
requestDispatherString
Constructors Summary
Methods Summary
public java.lang.ObjectgetAttribute(java.lang.String s)

        return attributes.get(s);
    
public java.util.EnumerationgetAttributeNames()

        Vector v = new Vector();
        v.addAll(attributes.keySet());

        return v.elements();
    
public java.lang.StringgetCharacterEncoding()

        return encoding;
    
public java.lang.StringgetContextPath()

        return this.context;
    
public java.lang.StringgetLocalAddr()

        return null;
    
public java.lang.StringgetLocalName()

        return null;
    
public intgetLocalPort()

        return 0;
    
public java.util.LocalegetLocale()

        return locale;
    
public java.lang.StringgetParameter(java.lang.String string)

        return (String) parameterMap.get(string);
    
public java.util.MapgetParameterMap()

        return parameterMap;
    
public java.util.EnumerationgetParameterNames()

        return Collections.enumeration(parameterMap.keySet());
    
public java.lang.String[]getParameterValues(java.lang.String string)

        return (String[]) parameterMap.get(string);
    
public java.lang.StringgetPathInfo()

        return pathInfo;
    
public java.lang.StringgetQueryString()

        return queryString;
    
public intgetRemotePort()

        return 0;
    
public javax.servlet.RequestDispatchergetRequestDispatcher(java.lang.String string)

        this.requestDispatherString = string;
        return super.getRequestDispatcher(string);
    
public java.lang.StringgetRequestDispatherString()
Get's the source string that was used in the last getRequestDispatcher method call.

        return requestDispatherString;
    
public java.lang.StringgetRequestURI()

        return requestURI;
    
public java.lang.StringgetScheme()

        return scheme;
    
public java.lang.StringgetServerName()

        return serverName;
    
public intgetServerPort()

        return serverPort;
    
public javax.servlet.http.HttpSessiongetSession()

        HttpSession session = null;

        try {
            session = super.getSession();
        } catch (AssertionFailedError e) {
            //ignore
        }

        if (session == null) {
            session = new StrutsMockHttpSession();
            setSession(session);
        }

        return session;
    
public voidsetAttribute(java.lang.String s, java.lang.Object o)



          
        attributes.put(s, o);
    
public voidsetCharacterEncoding(java.lang.String s)

        this.encoding = s;
    
public voidsetLocale(java.util.Locale locale)

        this.locale = locale;
    
public voidsetParameterMap(java.util.Map parameterMap)

        this.parameterMap = parameterMap;
    
public voidsetQueryString(java.lang.String queryString)

        this.queryString = queryString;
    
public voidsetRequestURI(java.lang.String requestURI)

        this.requestURI = requestURI;
    
public voidsetScheme(java.lang.String scheme)

        this.scheme = scheme;
    
public voidsetServerName(java.lang.String serverName)

        this.serverName = serverName;
    
public voidsetServerPort(int serverPort)

        this.serverPort = serverPort;
    
public voidsetupGetContext(java.lang.String context)

        this.context = context;
    
public voidsetupGetPathInfo(java.lang.String pathInfo)

        this.pathInfo = pathInfo;