docs: private boolean isFacesConfigPresent(ServletContext servletContext)
      {
          try
          {
              // 1. A faces-config.xml file is found in WEB-INF
              if (servletContext.getResource(FACES_CONFIG_RESOURCE) != null)
              {
                  return true;
              }
  
              // 4. The javax.faces.CONFIG_FILES context param is declared in web.xml or web-fragment.xml.
              // check for alternate faces-config files specified by javax.faces.CONFIG_FILES
              String configFilesAttrValue = servletContext.getInitParameter(FacesServlet.CONFIG_FILES_ATTR);
              if (configFilesAttrValue != null)
              {
                  String[] configFiles = configFilesAttrValue.split(",");
                  for (String file : configFiles)
                  {
                      if (servletContext.getResource(file.trim()) != null)
                      {
                          return true;
                      }
                  }
              }
  
              // 2. A faces-config.xml file is found in the META-INF directory of a jar in the 
              //    application's classpath.
              // 3. A filename ending in .faces-config.xml is found in the META-INF directory of a jar in 
              //    the application's classpath.
              // To do this properly it is necessary to use some SPI interfaces MyFaces already has, to 
              // deal with OSGi and other
              // environments properly.
              ExternalContext externalContext = new StartupServletExternalContextImpl(servletContext, true);
              FacesConfigResourceProviderFactory factory = FacesConfigResourceProviderFactory.
                  getFacesConfigResourceProviderFactory(externalContext);
              FacesConfigResourceProvider provider = factory.createFacesConfigResourceProvider(externalContext);
              Collection<URL> metaInfFacesConfigUrls =  provider.getMetaInfConfigurationResources(externalContext);
              
              if (metaInfFacesConfigUrls != null && !metaInfFacesConfigUrls.isEmpty())
              {
                  return true;
              }
              
              return false;
          }
          catch (Exception e)
          {
              return false;
          }
      }