Package org.apache.tapestry.request

Examples of org.apache.tapestry.request.RequestContext


    protected RequestContext createRequestContext(
        HttpServletRequest request,
        HttpServletResponse response)
        throws IOException
    {
        return new RequestContext(this, request, response);
    }
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();
            IResourceLocation webInfLocation = new ContextResourceLocation(context, "/WEB-INF/");
            IResourceLocation webInfAppLocation = webInfLocation.getRelativeLocation(servlet.getServletName() + "/");
            readQuestions(easyQuestions, webInfAppLocation, propertySource.getPropertyValue("easyquestionsfile"));
View Full Code Here

     *
     **/

    public static Resource getApplicationRootLocation(IRequestCycle cycle)
    {try { __CLOVER_33_0.M[209]++;
        __CLOVER_33_0.S[775]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_33_0.S[776]++;ServletContext servletContext = context.getServlet().getServletContext();
        __CLOVER_33_0.S[777]++;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[778]++;return new ContextResource(servletContext, servletPath);
View Full Code Here

     * @since 3.0
     */

    public static Resource getApplicationRootLocation(IRequestCycle cycle)
    {try { __CLOVER_33_0.M[2736]++;
        __CLOVER_33_0.S[11057]++;RequestContext context = cycle.getRequestContext();
        __CLOVER_33_0.S[11058]++;ServletContext servletContext = context.getServlet().getServletContext();
        __CLOVER_33_0.S[11059]++;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[11060]++;return new ContextResource(servletContext, servletPath);
View Full Code Here

    public void initialize(String pageName, IRequestCycle cycle)
    {try { __CLOVER_236_0.M[1248]++;
        __CLOVER_236_0.S[6056]++;if ((((LOG.isDebugEnabled()) && (++__CLOVER_236_0.CT[1068] != 0)) || (++__CLOVER_236_0.CF[1068] == 0))){
            __CLOVER_236_0.S[6057]++;LOG.debug("Initializing for " + pageName);}

        __CLOVER_236_0.S[6058]++;RequestContext context = cycle.getRequestContext();

        __CLOVER_236_0.S[6059]++;_pageName = pageName;
        __CLOVER_236_0.S[6060]++;_session = context.getSession();

        __CLOVER_236_0.S[6061]++;_attributePrefix = context.getServlet().getServletName() + "/" + _pageName + "/";

        __CLOVER_236_0.S[6062]++;restorePageChanges();
    } finally { }}
View Full Code Here

    private HttpServletResponse _servletResponse;

    public void initializeService()
    {
        RequestContext context = new RequestContext(_servletRequest, _servletResponse);

        _environment = new RequestCycleEnvironment(_errorHandler, _infrastructure, context,
                _strategySource, _absoluteURLBuilder);
    }
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

            condition = getCondition();
            writeValue(form, name, condition);
        }
        else
        {
            RequestContext context = cycle.getRequestContext();
            String submittedConditions[] = context.getParameters(name);
            condition = convertValue(submittedConditions[0]);
        }

        IBinding conditionValueBinding = getConditionValueBinding();
        if  (conditionValueBinding != null)
View Full Code Here

        setSelectedColumn(selectedColumn);
    }

    private void handleSubmission(IRequestCycle cycle)
    {
        RequestContext context = cycle.getRequestContext();
        String[] values = context.getParameters(getName());

        int count = Tapestry.size(values);

        if (count == 0)
            return;
View Full Code Here

        _specificationSource = engine.getSpecificationSource();
        _resolver = engine.getResourceResolver();
        _enhancer = engine.getComponentClassEnhancer();
        _componentResolver = new ComponentSpecificationResolver(cycle);

        RequestContext context = cycle.getRequestContext();

        // Need the location of the servlet within the context as the basis
        // for building relative context asset paths.

        HttpServletRequest request = context.getRequest();

        String servletPath = request.getServletPath();

        _servletLocation =
            new ContextResourceLocation(context.getServlet().getServletContext(), servletPath);

        // Create the mechanisms for walking the component tree when it is complete
        IComponentVisitor verifyRequiredParametersVisitor = new VerifyRequiredParametersVisitor();
        _verifyRequiredParametersWalker = new ComponentTreeWalker(new IComponentVisitor[] { verifyRequiredParametersVisitor });
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.