// set the TemplatedURLFormatter attribute on the context.
TemplatedURLFormatter.initServletContext( servletContext, formatter );
}
URLTemplatesFactory templatesFactory = URLTemplatesFactory.getURLTemplatesFactory( servletContext );
if ( templatesFactory == null )
{
// URLTemplatesFactory has not been initialized,
// get a URLTemplatesFactory object from the containerAdapter.
templatesFactory = PageFlowUtils.createURLTemplatesFactory( servletContext );
// get the known/req tokens from the default formatter for the factory to use to verify templates
templatesFactory.setKnownTokens( formatter.getKnownTokens() );
templatesFactory.setRequiredTokens( formatter.getRequiredTokens() );
templatesFactory.load( servletContext );
// set the URLTemplatesFactory attribute on the context.
URLTemplatesFactory.initServletContext( servletContext, templatesFactory );
}
}