String fragment, boolean forXML )
throws URISyntaxException
{
MutableURI uri = getActionURI( servletContext, request, response, actionName );
if ( params != null ) uri.addParameters( params, false );
if ( fragment != null ) uri.setFragment( uri.encode( fragment ) );
boolean needsToBeSecure = needsToBeSecure( servletContext, request, uri.getPath(), true );
URLRewriterService.rewriteURL( servletContext, request, response, uri, URLType.ACTION, needsToBeSecure );
String key = getURLTemplateKey( URLType.ACTION, needsToBeSecure );
URIContext uriContext = URIContextFactory.getInstance( forXML );