Package org.apache.myfaces.context.servlet

Examples of org.apache.myfaces.context.servlet.ServletExternalContextImpl


            throw new NullPointerException("response");
        }

        if (context instanceof ServletContext)
        {
            ExternalContext externalContext = new ServletExternalContextImpl(
                    (ServletContext) context, (ServletRequest) request, (ServletResponse) response,
                    _flashFactory);
           
            externalContext.getRequestMap().put(EXTERNAL_CONTEXT_KEY, externalContext);
           
            return externalContext;
        }
       
        throw new FacesException("Unsupported context type " + context.getClass().getName());
View Full Code Here


            throw new NullPointerException("response");
        }

        if (context instanceof ServletContext)
        {
            ExternalContext externalContext = new ServletExternalContextImpl(
                    (ServletContext) context, (ServletRequest) request, (ServletResponse) response);
           
            externalContext.getRequestMap().put(EXTERNAL_CONTEXT_KEY, externalContext);
           
            return externalContext;
        }
       
        throw new FacesException("Unsupported context type " + context.getClass().getName());
View Full Code Here

            throw new NullPointerException("response");
        }

        if (context instanceof ServletContext)
        {
            ExternalContext externalContext = new ServletExternalContextImpl(
                    (ServletContext) context, (ServletRequest) request, (ServletResponse) response,
                    _flashFactory);
           
            externalContext.getRequestMap().put(EXTERNAL_CONTEXT_KEY, externalContext);
           
            return externalContext;
        }
       
        throw new FacesException("Unsupported context type " + context.getClass().getName());
View Full Code Here

            if (b == null || b.booleanValue() == false)
            {
                log.trace("Initializing MyFaces");

                //Load the configuration
                ExternalContext externalContext = new ServletExternalContextImpl(servletContext, null, null);

                //And configure everything
                new FacesConfigurator(externalContext).configure();

                if ("true".equals(servletContext
View Full Code Here

            if (b == null || b.booleanValue() == false)
            {
                log.trace("Initializing MyFaces");

                //Load the configuration
                ExternalContext externalContext = new ServletExternalContextImpl(servletContext, null, null);

                //And configure everything
                new FacesConfigurator(externalContext).configure();

                if ("true".equals(servletContext
View Full Code Here

        }

        FacesContext facesContext = null;
       
        //We need this instance to be set later.
        ReleaseableExternalContext externalContext = new ServletExternalContextImpl((ServletContext)context,
                    (ServletRequest) request, (ServletResponse) response);
       
        // MyfacesGenericPortlet was replaced by jsr 301 portlet bridge,
        // and the bundled inside myfaces 1.2 sources does not work because
        // there was changes from 1.1 to 1.2 (viewhandler), so we
View Full Code Here

            throw new NullPointerException("response");
        }

        if (context instanceof ServletContext)
        {
            ExternalContext externalContext = new ServletExternalContextImpl(
                    (ServletContext) context, (ServletRequest) request, (ServletResponse) response,
                    _flashFactory);
           
            externalContext.getRequestMap().put(EXTERNAL_CONTEXT_KEY, externalContext);
           
            return externalContext;
        }
       
        throw new FacesException("Unsupported context type " + context.getClass().getName());
View Full Code Here

    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
    {
        HttpServletRequest request = (HttpServletRequest) servletRequest;
        HttpServletResponse response = (HttpServletResponse) servletResponse;

        ExternalContext externalContext = new ServletExternalContextImpl(_servletContext,
                                                                         servletRequest,
                                                                         servletResponse);
        JavascriptUtils.setJavascriptDetected(externalContext, true); // mark the session to use javascript

        log.info("Enabled JavaScript for session - redirect to" + request.getParameter("goto"));
View Full Code Here

            throw new NullPointerException("response");
        }

        if (context instanceof ServletContext)
        {
            ExternalContext externalContext = new ServletExternalContextImpl(
                    (ServletContext) context, (ServletRequest) request, (ServletResponse) response);
           
            externalContext.getRequestMap().put(EXTERNAL_CONTEXT_KEY, externalContext);
           
            return externalContext;
        }
       
        throw new FacesException("Unsupported context type " + context.getClass().getName());
View Full Code Here

            // Some parts of the following configuration tasks have been implemented
            // by using an ExternalContext. However, that's no problem as long as no
            // one tries to call methods depending on either the ServletRequest or
            // the ServletResponse.
            ExternalContext externalContext = new ServletExternalContextImpl(
                    servletContext, null, null);

            // Parse and validate the web.xml configuration file
            WebXml webXml = WebXml.getWebXml(externalContext);
            if (webXml == null) {
View Full Code Here

TOP

Related Classes of org.apache.myfaces.context.servlet.ServletExternalContextImpl

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.