code: public int doEndTag() throws JspException
      {
          HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
          HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
          ServletContext context = pageContext.getServletContext();
  
          try {
              boolean encoded = false;
              UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
              if (urlConfig != null) {
                  encoded = !urlConfig.isUrlEncodeUrls();
              }
  
              FreezableMutableURI uri = new FreezableMutableURI();
              uri.setEncoding(response.getCharacterEncoding());
              uri.setURI(url, encoded);
              boolean needsToBeSecure = false;
              if (_params != null) {
                  uri.addParameters(_params, false );
              }
              if (!uri.isAbsolute() && PageFlowUtils.needsToBeSecure(context, request, url, true)) {
                  needsToBeSecure = true;
              }
  
              URLRewriterService.rewriteURL(context, request, response, uri, URLType.ACTION, needsToBeSecure);
              String key = PageFlowUtils.getURLTemplateKey(URLType.ACTION, needsToBeSecure);
              boolean forXML = TagRenderingBase.Factory.isXHTML(request);
              URIContext uriContext = URIContextFactory.getInstance(forXML);
              String uriString = URLRewriterService.getTemplatedURL(context, request, uri, key, uriContext);
              write(response.encodeURL(uriString));
          }
          catch (URISyntaxException e) {
              // report the error...
              String s = Bundle.getString("Tags_RewriteURL_URLException",
                      new Object[]{url, e.getMessage()});
              registerTagError(s, e);
              reportErrors();
          }
  
          localRelease();
          return EVAL_PAGE;
      }
docs: Render the end of the rewriteURL tag.
  @throws JspException if a JSP exception has occurred