code: public static String createURL(String href, String action, String location, String scope, Map params, JspContext jspContext)
              throws URISyntaxException {
          PageContext pageContext = getPageContext(jspContext);
  
          /* add the jpfScopeID parameter, if the scope attribute is present. */
          if(scope != null) {
              if(params == null)
                  params = new HashMap();
  
              params.put(ScopedServletUtils.SCOPE_ID_PARAM, scope);
          }
  
          String uri = null;
          if(action != null)
              uri = PageFlowTagUtils.rewriteActionURL(pageContext, action, params, location);
          else if(href != null)
              uri = PageFlowTagUtils.rewriteHrefURL(pageContext, href, params, location);
          else
              return ((HttpServletRequest)pageContext.getRequest()).getPathTranslated();
  
          assert uri != null;
  
          HttpServletResponse response = (HttpServletResponse)pageContext.getResponse();
          return response.encodeURL(uri);
      }
docs: <p>
  Utility method used by data grid related classes to create URLs.  If both an action name and href are provided,
  the action name will be used to construct the URL string.
  </p>
  @param href the href
  @param action the action
  @param location the intra page location
  @param scope the scope into which to create the URL
  @param params a map of parameters to attach to the URL
  @param jspContext the jsp context
  @return a URL represented as a string.  This URL will be correctly encoded by calling {@link HttpServletResponse#encodeURL(String)}
  @throws URISyntaxException