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

StrutsMockPageContext

public class StrutsMockPageContext extends com.mockobjects.servlet.MockPageContext

Fields Summary
private Map
attributes
private ServletResponse
response
Constructors Summary
Methods Summary
public java.lang.ObjectfindAttribute(java.lang.String s)

        return attributes.get(s);
    
public java.lang.ObjectgetAttribute(java.lang.String key)

        return attributes.get(key);
    
public java.lang.ObjectgetAttributes(java.lang.String key)

        return this.attributes.get(key);
    
public javax.servlet.ServletResponsegetResponse()

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

        HttpSession session = super.getSession();

        if (session == null) {
            session = ((HttpServletRequest) getRequest()).getSession(true);
        }

        return session;
    
public voidremoveAttribute(java.lang.String key)

        this.attributes.remove(key);
    
public voidsetAttribute(java.lang.String s, java.lang.Object o)



          
        if ((s == null) || (o == null)) {
            throw new NullPointerException("PageContext does not accept null attributes");
        }

        this.attributes.put(s, o);
    
public voidsetResponse(javax.servlet.ServletResponse response)

        this.response = response;