Package com.sun.faces.context

Examples of com.sun.faces.context.ExternalContextImpl


   
    public String getUrl(){
        ServletContext servletContext = (ServletContext) getFacesContext().getExternalContext().getContext();
        ServletRequest request = (ServletRequest) getExternalContext().getRequest();
        ServletResponse response =(ServletResponse) getExternalContext().getResponse();
        ExternalContextImpl external = new ExternalContextImpl(servletContext, request, response);
        return (external.isSecure()?"https":"http")
                +"://"+getExternalContext().getRequestServerName()+":"+
                getExternalContext().getRequestServerPort()+
                getExternalContext().getRequestContextPath();
    }
View Full Code Here


            factory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);

        // wrap the request so we can control the return value of getServletPath
        TestRequest testRequest = new TestRequest(request);

        ExternalContext extContext = new ExternalContextImpl(
            config.getServletContext(),
            testRequest,
            response);
        FacesContext facesContext = new FacesContextImpl(extContext, lifecycle);
        String contextPath = request.getContextPath();
View Full Code Here

        LifecycleFactory factory = (LifecycleFactory)
            FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
        Lifecycle lifecycle =
            factory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
        ExternalContext extContext =
            new ExternalContextImpl(config.getServletContext(),
                                    request, response);
        FacesContext context =
            new FacesContextImpl(extContext, lifecycle);

        // Validate correct calculations
View Full Code Here

        return null;
    }

    @Override
    public ExternalContext getExternalContext() {
        return new ExternalContextImpl(context, request, response);
    }
View Full Code Here

TOP

Related Classes of com.sun.faces.context.ExternalContextImpl

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.