code: public static String rewriteHrefURL(PageContext pageContext, String url, Map params, String location)
              throws URISyntaxException
      {
          ServletContext servletContext = pageContext.getServletContext();
          HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
          HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
          boolean forXML = TagRenderingBase.Factory.isXHTML(request);
          return PageFlowUtils.getRewrittenHrefURI(servletContext, request, response, url, params, location, forXML);
      }
docs: Create a fully-rewritten url from an initial href url with query parameters
  and an anchor (location on page), checking if it needs to be secure then call
  the rewriter service using a type of {@link org.apache.beehive.netui.core.urls.URLType#ACTION}.
  @param pageContext the current PageContext.
  @param url         the href url to rewrite.
  @param params      the query parameters for this url.
  @param location    the location (anchor or fragment) for this url.
  @return a url that has been run through the URL rewriter service.
  @see PageFlowUtils#getRewrittenHrefURI(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest,
  javax.servlet.http.HttpServletResponse, String, java.util.Map, String, boolean)