private static FacesInitializer _getFacesInitializerFromInitParam ( ServletContext context ) { String initializerClassName = context . getInitParameter ( FACES_INITIALIZER_PARAM ) ; if ( initializerClassName != null ) { try { // get Class object Class < ? > clazz = ClassUtils . classForName ( initializerClassName ) ; if ( ! FacesInitializer . class . isAssignableFrom ( clazz ) ) { throw new FacesException ( "Class " + clazz + " does not implement FacesInitializer" ) ; } // create instance and return it return ( FacesInitializer ) ClassUtils . newInstance ( clazz ) ; } catch ( ClassNotFoundException cnfe ) { throw new FacesException ( "Could not find class of specified FacesInitializer" , cnfe ) ; } } return null ; }
Gets a FacesInitializer from the web . xml config param .