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