code: @SuppressWarnings("unchecked")
      private String checkForListeners(WebAppConfig config) {
          String listenerFound = NO_LISTENER_REGISTERED_STRING;
          if (config != null) {
              List listeners = config.getListeners();
              for (Object listener : listeners) {
                  String listenerClassname;
                  /*
                   * if(listener instanceof JavaClassImpl)
                   * listenerClassname = ((JavaClassImpl)listener).getQualifiedName();
                   * else
                   */if (listener instanceof String)
                      listenerClassname = (String) listener;
                  else
                      continue; //skip this listener
                  if (listenerClassname.equals(SUN_CONFIGURE_LISTENER_CLASSNAME)) {
                      listenerFound = SUN_LISTENER_REGISTERED_STRING;
                      break;
                  } else if (listenerClassname.equals(MYFACES_LIFECYCLE_LISTENER_CLASSNAME)) {
                      listenerFound = MYFACES_LISTENER_REGISTERED_STRING;
                      break;
                  }
              }
          }
          return listenerFound;
      }
docs: /*
  check for configureListener or startupServletContextListener already configured from web.xml or via tld