public static void initServletContext ( ServletContext servletContext , URLTemplatesFactory templatesFactory ) { assert servletContext != null : "The ServletContext cannot be null." ; if ( servletContext == null ) { throw new IllegalArgumentException ( "The ServletContext cannot be null." ) ; } servletContext . setAttribute ( URL_TEMPLATE_FACTORY_ATTR , templatesFactory ) ; }
Adds a given URLTemplatesFactory instance as an attribute on the ServletContext .