code: @Override
      public int doEndTag() throws JspException {
          String result;                // the eventual result
  
          // add (already encoded) parameters
          String baseUrl = resolveUrl(value, context, pageContext);
          result = params.aggregateParams(baseUrl);
  
          // if the URL is relative, rewrite it
          if (!UrlUtil.isAbsoluteUrl(result)) {
              HttpServletResponse response =
                      ((HttpServletResponse) pageContext.getResponse());
              result = response.encodeURL(result);
          }
  
          // store or print the output
          if (var != null) {
              pageContext.setAttribute(var, result, scope);
          } else {
              try {
                  pageContext.getOut().print(result);
              } catch (java.io.IOException ex) {
                  throw new JspTagException(ex.toString(), ex);
              }
          }
  
          return EVAL_PAGE;
      }
docs: gets the right value, encodes it, and prints or stores it