Package org.apache.myfaces.shared_impl.webapp.webxml

Examples of org.apache.myfaces.shared_impl.webapp.webxml.WebXml


    public void destroyFaces(ServletContext servletContext) {
       
        FacesContext facesContext = FacesContext.getCurrentInstance();
       
        //We need to check if the current application was initialized by myfaces
        WebXml webXml = WebXml.getWebXml(facesContext.getExternalContext());
        if (webXml == null) {
            if (log.isLoggable(Level.WARNING)) {
                log.warning("Couldn't find the web.xml configuration file. "
                         + "Abort destroy MyFaces.");
            }

            return;
        } else if (webXml.getFacesServletMappings().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


       
        boolean errorPageWritten = false;
       
        // 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())
        {
            // 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.shared_impl.webapp.webxml.WebXml

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.