Package org.apache.tapestry.request

Examples of org.apache.tapestry.request.RequestContext


        __CLOVER_71_0.S[1580]++;if ((((_localeChanged) && (++__CLOVER_71_0.CT[300] != 0)) || (++__CLOVER_71_0.CF[300] == 0))){
        {
            __CLOVER_71_0.S[1581]++;_localeChanged = false;

            __CLOVER_71_0.S[1582]++;RequestContext context = cycle.getRequestContext();

            __CLOVER_71_0.S[1583]++;ApplicationServlet.writeLocaleCookie(_locale, this, context);
        }}

        // Commit all changes and ignore further changes.
View Full Code Here


     * this implementation.
     */

    public void restart(IRequestCycle cycle) throws IOException
    {try { __CLOVER_71_0.M[389]++;
        __CLOVER_71_0.S[1596]++;RequestContext context = cycle.getRequestContext();

        __CLOVER_71_0.S[1597]++;HttpSession session = context.getSession();

        __CLOVER_71_0.S[1598]++;if ((((session != null) && (++__CLOVER_71_0.CT[303] != 0)) || (++__CLOVER_71_0.CF[303] == 0))){
        {
            __CLOVER_71_0.S[1599]++;try
            {
                __CLOVER_71_0.S[1600]++;session.invalidate();
            }
            catch (IllegalStateException ex)
            {
                __CLOVER_71_0.S[1601]++;if ((((LOG.isDebugEnabled()) && (++__CLOVER_71_0.CT[304] != 0)) || (++__CLOVER_71_0.CF[304] == 0))){
                    __CLOVER_71_0.S[1602]++;LOG.debug("Exception thrown invalidating HttpSession.", ex);}

                // Otherwise, ignore it.
            }
        }}

        // Make isStateful() return false, so that the servlet doesn't
        // try to store the engine back into the (now invalid) session.

        __CLOVER_71_0.S[1603]++;_stateful = false;

        __CLOVER_71_0.S[1604]++;String url = context.getAbsoluteURL(_servletPath);

        __CLOVER_71_0.S[1605]++;context.redirect(url);
    } finally { }}
View Full Code Here

        {
            __CLOVER_138_0.S[3359]++;i = Tapestry.coerceToIterator(getSourceBinding().getObject());
        }}
        else{
        {
            __CLOVER_138_0.S[3360]++;RequestContext context = cycle.getRequestContext();
            __CLOVER_138_0.S[3361]++;String[] submittedValues = context.getParameters(name);

            __CLOVER_138_0.S[3362]++;i = Tapestry.coerceToIterator(submittedValues);
        }}

        // If the source (when rendering), or the submitted values (on submit)
View Full Code Here

    public void initialize(IRequestCycle cycle)
    {
        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();

            Resource webInfLocation = new ContextResource(context, "/WEB-INF/");
View Full Code Here

        IEngineServiceView engine,
        IRequestCycle cycle,
        ResponseOutputStream output)
        throws ServletException, IOException
    {try { __CLOVER_105_0.M[585]++;
        __CLOVER_105_0.S[2493]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_105_0.S[2494]++;HttpServletRequest request = context.getRequest();

        __CLOVER_105_0.S[2495]++;String serviceName = getAttribute(request, Tapestry.TAG_SUPPORT_SERVICE_ATTRIBUTE);

        __CLOVER_105_0.S[2496]++;Object raw = request.getAttribute(Tapestry.TAG_SUPPORT_PARAMETERS_ATTRIBUTE);
        __CLOVER_105_0.S[2497]++;Object[] parameters = null;

        __CLOVER_105_0.S[2498]++;try
        {
            __CLOVER_105_0.S[2499]++;parameters = (Object[]) raw;
        }
        catch (ClassCastException ex)
        {
            __CLOVER_105_0.S[2500]++;throw new ServletException(
                Tapestry.format(
                    "TagSupportService.attribute-not-array",
                    Tapestry.TAG_SUPPORT_PARAMETERS_ATTRIBUTE,
                    Tapestry.getClassName(raw.getClass())));
        }

        __CLOVER_105_0.S[2501]++;IEngineService service = cycle.getEngine().getService(serviceName);

        __CLOVER_105_0.S[2502]++;ILink link = service.getLink(cycle, null, parameters);

        __CLOVER_105_0.S[2503]++;String URI = link.getURL();

        __CLOVER_105_0.S[2504]++;if ((((LOG.isDebugEnabled()) && (++__CLOVER_105_0.CT[464] != 0)) || (++__CLOVER_105_0.CF[464] == 0))){
        {
          __CLOVER_105_0.S[2505]++;LOG.debug("Request servlet path = " + request.getServletPath());
         
            __CLOVER_105_0.S[2506]++;Enumeration e = request.getParameterNames();
            __CLOVER_105_0.S[2507]++;while ((((e.hasMoreElements()) && (++__CLOVER_105_0.CT[465] != 0)) || (++__CLOVER_105_0.CF[465] == 0))){
            {
                __CLOVER_105_0.S[2508]++;String name = (String) e.nextElement();
                __CLOVER_105_0.S[2509]++;LOG.debug("Request parameter " + name + " = " + request.getParameter(name));
            }}
            __CLOVER_105_0.S[2510]++;e = request.getAttributeNames();
            __CLOVER_105_0.S[2511]++;while ((((e.hasMoreElements()) && (++__CLOVER_105_0.CT[466] != 0)) || (++__CLOVER_105_0.CF[466] == 0))){
            {
                __CLOVER_105_0.S[2512]++;String name = (String) e.nextElement();
                __CLOVER_105_0.S[2513]++;LOG.debug("Request attribute " + name + " = " + request.getAttribute(name));
            }}

            __CLOVER_105_0.S[2514]++;LOG.debug("Result URI: " + URI);
        }}

        __CLOVER_105_0.S[2515]++;HttpServletResponse response = context.getResponse();
        __CLOVER_105_0.S[2516]++;PrintWriter servletWriter = response.getWriter();

        __CLOVER_105_0.S[2517]++;IMarkupWriter writer = new HTMLWriter(servletWriter);

        __CLOVER_105_0.S[2518]++;writer.print(URI);
View Full Code Here

        __CLOVER_101_0.S[2267]++;_internal = !(location.startsWith("/") || location.indexOf("://") > 0);
    } finally { }}

    public void process(IRequestCycle cycle)
    {try { __CLOVER_101_0.M[545]++;
        __CLOVER_101_0.S[2268]++;RequestContext context = cycle.getRequestContext();

        __CLOVER_101_0.S[2269]++;if ((((_internal) && (++__CLOVER_101_0.CT[422] != 0)) || (++__CLOVER_101_0.CF[422] == 0))){
            __CLOVER_101_0.S[2270]++;forward(context);}
        else{
            __CLOVER_101_0.S[2271]++;redirect(context);}
View Full Code Here

     * @since 3.0
     */

    public static Resource getApplicationRootLocation(IRequestCycle cycle)
    {try { __CLOVER_33_0.M[2929]++;
        __CLOVER_33_0.S[12045]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_33_0.S[12046]++;ServletContext servletContext = context.getServlet().getServletContext();
        __CLOVER_33_0.S[12047]++;String servletPath = context.getRequest().getServletPath();

        // Could strip off the servlet name (i.e., "app" in "/app") but
        // there's no need.

        __CLOVER_33_0.S[12048]++;return new ContextResource(servletContext, servletPath);
View Full Code Here

    {try { __CLOVER_80_0.M[3032]++;
        __CLOVER_80_0.S[12480]++;IDirect direct;
        __CLOVER_80_0.S[12481]++;int count = 0;
        __CLOVER_80_0.S[12482]++;String componentPageName;
        __CLOVER_80_0.S[12483]++;IPage componentPage;
        __CLOVER_80_0.S[12484]++;RequestContext requestContext = cycle.getRequestContext();
        __CLOVER_80_0.S[12485]++;String[] serviceContext = getServiceContext(requestContext);

        __CLOVER_80_0.S[12486]++;if ((((serviceContext != null) && (++__CLOVER_80_0.CT[2139] != 0)) || (++__CLOVER_80_0.CF[2139] == 0))){
            __CLOVER_80_0.S[12487]++;count = serviceContext.length;}
View Full Code Here

              component, null, null);
       
        IXTile xtile = (IXTile) component;
       
        // do not squeeze on input
    RequestContext context = cycle.getRequestContext();
        String[] params = context.getParameters(ServiceConstants.PARAMETER);
        cycle.setServiceParameters(params);
        xtile.trigger(cycle);
       
        // do not squeeze on output either
        Object[] args = cycle.getServiceParameters();
View Full Code Here

        {
            i = Tapestry.coerceToIterator(getSourceBinding().getObject());
        }
        else
        {
            RequestContext context = cycle.getRequestContext();
            String[] submittedValues = context.getParameters(name);

            i = Tapestry.coerceToIterator(submittedValues);
        }

        // If the source (when rendering), or the submitted values (on submit)
View Full Code Here

TOP

Related Classes of org.apache.tapestry.request.RequestContext

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.