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