Package org.apache.tapestry.web

Examples of org.apache.tapestry.web.ServletWebContext


    private ApplicationGlobals _globals;

    public void initialize(HttpServlet servlet)
    {
        ServletContext servletContext = servlet.getServletContext();
        WebContext context = new ServletWebContext(servletContext);

        _globals.storeContext(context);
    }
View Full Code Here


        context.getInitParameterNames();
        control.setReturnValue(newEnumeration());

        replayControls();

        WebContext wc = new ServletWebContext(context);

        List l = wc.getInitParameterNames();

        checkList(l);

        verifyControls();
    }
View Full Code Here

        context.getInitParameter("artist");
        control.setReturnValue(value);

        replayControls();

        WebContext wc = new ServletWebContext(context);

        assertSame(value, wc.getInitParameterValue("artist"));

        verifyControls();
    }
View Full Code Here

        context.getAttributeNames();
        control.setReturnValue(newEnumeration());

        replayControls();

        WebContext wc = new ServletWebContext(context);

        List l = wc.getAttributeNames();

        checkList(l);

        verifyControls();
    }
View Full Code Here

        context.getAttribute("attr");
        control.setReturnValue(attribute);

        replayControls();

        WebContext wc = new ServletWebContext(context);

        assertSame(attribute, wc.getAttribute("attr"));

        verifyControls();
    }
View Full Code Here

        context.setAttribute("name", attribute);

        replayControls();

        WebContext wc = new ServletWebContext(context);

        wc.setAttribute("name", attribute);

        verifyControls();
    }
View Full Code Here

        context.removeAttribute("tonull");

        replayControls();

        WebContext wc = new ServletWebContext(context);

        wc.setAttribute("tonull", null);

        verifyControls();
    }
View Full Code Here

        context.getResource("/tapestry");
        control.setReturnValue(url);

        replayControls();

        WebContext wc = new ServletWebContext(context);

        assertSame(url, wc.getResource("/tapestry"));

        verifyControls();
    }
View Full Code Here

        replayControls();

        interceptLogging(ServletWebContext.class.getName());

        WebContext wc = new ServletWebContext(context);

        assertNull(wc.getResource("/tapestry"));

        verifyControls();

        assertLoggedMessage("Error getting context resource '/tapestry': Like this ever happens.");
    }
View Full Code Here

    private ApplicationGlobals _globals;

    public void initialize(HttpServlet servlet)
    {
        ServletContext servletContext = servlet.getServletContext();
        WebContext context = new ServletWebContext(servletContext);

        _globals.storeServletContext(servletContext);
        _globals.storeWebContext(context);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.web.ServletWebContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.