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