public static URLTemplatesFactory getURLTemplatesFactory ( ServletContext servletContext ) { assert servletContext != null : "The ServletContext cannot be null." ; if ( servletContext == null ) { throw new IllegalArgumentException ( "The ServletContext cannot be null." ) ; } return ( URLTemplatesFactory ) servletContext . getAttribute ( URL_TEMPLATE_FACTORY_ATTR ) ; }
Gets the URLTemplatesFactory instance from a ServletContext attribute .