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