code: 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 );
      }
docs: Adds a given TemplatedURLFormatter instance as an attribute on the ServletContext.
  
  @param servletContext the current ServletContext.
  @param formatter the TemplatedURLFormatter instance to add as an attribute of the context