code: 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 );
      }
docs: Gets the TemplatedURLFormatter instance from a ServletContext attribute.
  
  @param servletContext the current ServletContext.
  @return the TemplatedURLFormatter instance from the ServletContext.