Package org.apache.myfaces.commons.resourcehandler.webapp.config.element

Examples of org.apache.myfaces.commons.resourcehandler.webapp.config.element.ServletRegistration


        String delegateFacesServlet = WebConfigParamUtils.getStringInitParameter(context.getExternalContext(),
                INIT_PARAM_DELEGATE_FACES_SERVLET);
       
        for (Map.Entry<String, ? extends ServletRegistration> entry : webRegistration.getServletRegistrations().entrySet())
        {
            ServletRegistration registration = entry.getValue();
            boolean facesServlet = false;
            if (FacesServlet.class.getName().equals(registration.getClassName()))
            {
                facesServlet = true;
            }
            else if (delegateFacesServlet != null && delegateFacesServlet.equals(registration.getClassName()))
            {
                facesServlet = true;
            }
            else
            {
                if (DELEGATE_FACES_SERVLET_INTERFACE_CLASS != null)
                {
                    try
                    {
                        Class servletClass = ClassUtils.classForName(registration.getClassName());
                        if (DELEGATE_FACES_SERVLET_INTERFACE_CLASS.isAssignableFrom(servletClass));
                        {
                            facesServlet = true;
                        }
                    }
                    catch (ClassNotFoundException e)
                    {
                        Log log = LogFactory.getLog(ExtendedDefaultResourceHandlerSupport.class);
                        if (log.isTraceEnabled())
                        {
                            log.trace("cannot load servlet class to detect if is a FacesServlet or DelegateFacesServlet", e);
                        }
                    }
                }
            }
            if (facesServlet)
            {
                for (String urlPattern : registration.getMappings())
                {
                    String extension = urlPattern != null && urlPattern.startsWith("*.") ? urlPattern.substring(urlPattern
                            .indexOf('.')) : null;
                    if (extension == null)
                    {
View Full Code Here


                INIT_PARAM_DELEGATE_FACES_SERVLET);
       
        for (Map.Entry<String, ? extends ServletRegistration> entry :
                webRegistration.getServletRegistrations().entrySet())
        {
            ServletRegistration registration = entry.getValue();
            boolean facesServlet = false;
            if (FacesServlet.class.getName().equals(registration.getClassName()))
            {
                facesServlet = true;
            }
            else if (delegateFacesServlet != null && delegateFacesServlet.equals(registration.getClassName()))
            {
                facesServlet = true;
            }
            else
            {
                if (DELEGATE_FACES_SERVLET_INTERFACE_CLASS != null)
                {
                    try
                    {
                        Class servletClass = ClassUtils.classForName(registration.getClassName());
                        if (DELEGATE_FACES_SERVLET_INTERFACE_CLASS.isAssignableFrom(servletClass))
                        {
                            facesServlet = true;
                        }
                    }
                    catch (ClassNotFoundException e)
                    {
                        Log log = LogFactory.getLog(ExtendedDefaultResourceHandlerSupport.class);
                        if (log.isTraceEnabled())
                        {
                            log.trace("cannot load servlet class to detect if is a FacesServlet or DelegateFacesServlet"
                                     , e);
                        }
                    }
                }
            }
            if (facesServlet)
            {
                for (String urlPattern : registration.getMappings())
                {
                    String extension = urlPattern != null && urlPattern.startsWith("*.")
                                            ? urlPattern.substring(urlPattern.indexOf('.'))
                                            : null;
                    if (extension == null)
View Full Code Here

TOP

Related Classes of org.apache.myfaces.commons.resourcehandler.webapp.config.element.ServletRegistration

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.