Package org.apache.myfaces.spi

Examples of org.apache.myfaces.spi.WebConfigProvider


            // Parse and validate the web.xml configuration file
           
            if (!WebConfigParamUtils.getBooleanInitParameter(externalContext, INITIALIZE_ALWAYS_STANDALONE, false))
            {
                WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                        facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

                if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty())
                {
                    // check if the FacesServlet has been added dynamically
                    // in a Servlet 3.0 environment by MyFacesContainerInitializer
                    Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                    if (mappingAdded == null || !mappingAdded)
View Full Code Here


        if (!WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(),
                                                         INITIALIZE_ALWAYS_STANDALONE, false))
        {
            //We need to check if the current application was initialized by myfaces
            WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                    facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

            if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty())
            {
                // check if the FacesServlet has been added dynamically
                // in a Servlet 3.0 environment by MyFacesContainerInitializer
                Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                if (mappingAdded == null || !mappingAdded)
View Full Code Here

       
        // check if an error page is present in web.xml
        // if so, do not generate an error page
        //WebXml webXml = WebXml.getWebXml(facesContext.getExternalContext());
        //if (webXml.isErrorPagePresent())
        WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());
       
        if(webConfigProvider.isErrorPagePresent(facesContext.getExternalContext()))
        {
            // save current view in the request map to access it on the error page
            facesContext.getExternalContext().getRequestMap().put(VIEW_KEY, facesContext.getViewRoot());
        }
        else
View Full Code Here

            // Parse and validate the web.xml configuration file
           
            if (!WebConfigParamUtils.getBooleanInitParameter(externalContext, INITIALIZE_ALWAYS_STANDALONE, false))
            {
                WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                        facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

                if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) {
                    // check if the FacesServlet has been added dynamically
                    // in a Servlet 3.0 environment by MyFacesContainerInitializer
                    Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                    if (mappingAdded == null || !mappingAdded)
                    {
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
       
        if (!WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(), INITIALIZE_ALWAYS_STANDALONE, false))
        {
            //We need to check if the current application was initialized by myfaces
            WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                    facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());
           
            if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) {
                // check if the FacesServlet has been added dynamically
                // in a Servlet 3.0 environment by MyFacesContainerInitializer
                Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                if (mappingAdded == null || !mappingAdded)
                {
View Full Code Here

        // check if an error page is present in web.xml
        // if so, do not generate an error page
        //WebXml webXml = WebXml.getWebXml(facesContext.getExternalContext());
        //if (webXml.isErrorPagePresent())
        WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

        if(webConfigProvider.isErrorPagePresent(facesContext.getExternalContext()))
        {
            // save current view in the request map to access it on the error page
            facesContext.getExternalContext().getRequestMap().put(VIEW_KEY, facesContext.getViewRoot());
        }
        else
View Full Code Here

       
        // check if an error page is present in web.xml
        // if so, do not generate an error page
        //WebXml webXml = WebXml.getWebXml(facesContext.getExternalContext());
        //if (webXml.isErrorPagePresent())
        WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());
       
        if(webConfigProvider.isErrorPagePresent(facesContext.getExternalContext()))
        {
            // save current view in the request map to access it on the error page
            facesContext.getExternalContext().getRequestMap().put(VIEW_KEY, facesContext.getViewRoot());
        }
        else
View Full Code Here

            // Parse and validate the web.xml configuration file
           
            if (!WebConfigParamUtils.getBooleanInitParameter(externalContext, INITIALIZE_ALWAYS_STANDALONE, false))
            {
                WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                        facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

                if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) {
                    // check if the FacesServlet has been added dynamically
                    // in a Servlet 3.0 environment by MyFacesContainerInitializer
                    Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                    if (mappingAdded == null || !mappingAdded)
                    {
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
       
        if (!WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(), INITIALIZE_ALWAYS_STANDALONE, false))
        {
            //We need to check if the current application was initialized by myfaces
            WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                    facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());
           
            if (webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty()) {
                // check if the FacesServlet has been added dynamically
                // in a Servlet 3.0 environment by MyFacesContainerInitializer
                Boolean mappingAdded = (Boolean) servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
                if (mappingAdded == null || !mappingAdded)
                {
View Full Code Here

        // check if an error page is present in web.xml
        // if so, do not generate an error page
        //WebXml webXml = WebXml.getWebXml(facesContext.getExternalContext());
        //if (webXml.isErrorPagePresent())
        WebConfigProvider webConfigProvider = WebConfigProviderFactory.getWebConfigProviderFactory(
                facesContext.getExternalContext()).getWebConfigProvider(facesContext.getExternalContext());

        if(webConfigProvider.isErrorPagePresent(facesContext.getExternalContext()))
        {
            // save current view in the request map to access it on the error page
            facesContext.getExternalContext().getRequestMap().put(VIEW_KEY, facesContext.getViewRoot());
        }
        else
View Full Code Here

TOP

Related Classes of org.apache.myfaces.spi.WebConfigProvider

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.