code: public static String getRewrittenResourceURI( ServletContext servletContext, HttpServletRequest request,
                                                    HttpServletResponse response, String path, Map params,
                                                    String fragment, boolean forXML )
              throws URISyntaxException
      {
          return rewriteResourceOrHrefURL( servletContext, request, response, path, params, fragment, forXML, URLType.RESOURCE );
      }
docs: Create a fully-rewritten URI given a path and parameters.
  
  <p> Calls the rewriter service using a type of {@link URLType#RESOURCE}. </p>
  
  @param servletContext the current ServletContext.
  @param request the current HttpServletRequest.
  @param response the current HttpServletResponse.
  @param path the path to process into a fully-rewritten URI.
  @param params the additional parameters to include in the URI query.
  @param fragment the fragment (anchor or location) for this URI.
  @param forXML flag indicating that the query of the uri should be written
  using the &quot;&amp;amp;&quot; entity, rather than the character, '&amp;'.
  @return a fully-rewritten URI for the given action.
  @throws URISyntaxException if there's a problem converting the action URI (derived
  from processing the given action name) into a MutableURI.