code: public static String rewriteActionURL(PageContext pageContext, String action, 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);
          if (action.length() > 0 && action.charAt(0) == '/') action = action.substring(1);
          return PageFlowUtils.getRewrittenActionURI(servletContext, request, response, action, params, location, forXML);
      }
docs: Create a fully-rewritten url from an initial action 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 action      the action url to rewrite.
  @param params      the query parameters for this url.
  @param location    the location (anchor or fragment) for this url.
  @return a uri that has been run through the URL rewriter service.