code: public void doTag()
              throws JspException, IOException
      {
          PageContext pageContext = getPageContext();
          HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
          TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.BASE_TAG, request);
  
          // evaluate the body, this is called basically so any attributes my be applied.
          getBufferBody(false);
  
          InternalStringBuilder buf = new InternalStringBuilder(64);
  
          // calculate the href
          buf.append(request.getScheme());
          buf.append("://");
          buf.append(request.getServerName());
  
          String scheme = request.getScheme();
          int port = request.getServerPort();
          if ("http".equals(scheme) && (80 == port)) {
              //Do nothing
          }
          else if ("https".equals(scheme) && (443 == port)) {
              //Do nothing
          }
          else {
              buf.append(":");
              buf.append(request.getServerPort());
          }
          buf.append(request.getRequestURI());
          _state.href = buf.toString();
  
          // render the tag.
          WriteRenderAppender writer = new WriteRenderAppender(pageContext);
          br.doStartTag(writer, _state);
          br.doEndTag(writer);
  
          // This will produce invalid HTML/XHTML if there are errors
          // because we are going to put markup out into the head.
          if (hasErrors())
              reportErrors();
      }
docs: Render the hyperlink.
  @throws JspException if a JSP exception has occurred