code: @Override
      public int doEndTag() throws JspException {
          try {
              // If we didn't expose a Reader earlier...
              if (varReader == null) {
                  // ... store it in 'var', if available ...
                  if (var != null) {
                      pageContext.setAttribute(var, acquireString(), scope);
                  }
                  // ... or simply output it, if we have nowhere to expose it
                  else {
                      pageContext.getOut().print(acquireString());
                  }
              }
              return EVAL_PAGE;
          } catch (IOException ex) {
              throw new JspTagException(ex.toString(), ex);
          }
      }
docs: manages connections as necessary (creating or destroying)