code: public int doEndTag() throws JspException
      {
          ServletRequest req = pageContext.getRequest();
          String scriptId = null;
  
          // report errors that may have occurred
          if (hasErrors())
              return reportAndExit(EVAL_PAGE);
  
          // Generate the name definition or image element
          String uri = null;
          if (_state.src != null) {
              try {
                  uri = PageFlowTagUtils.rewriteResourceURL(pageContext, _state.src, _params, _location);
              }
              catch (URISyntaxException e) {
                  // report the error...
                  String s = Bundle.getString("Tags_Image_URLException",
                          new Object[]{_state.src, e.getMessage()});
                  registerTagError(s, e);
              }
          }
  
          if (uri != null) {
              _state.src = ((HttpServletResponse) pageContext.getResponse()).encodeURL(uri);
          }
  
          // we assume that tagId will over have override id if both
          // are defined.
          if (_state.id != null) {
              scriptId = renderNameAndId((HttpServletRequest) req, _state, null);
          }
  
          WriteRenderAppender writer = new WriteRenderAppender(pageContext);
          TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.IMAGE_TAG, req);
          br.doStartTag(writer, _state);
          br.doEndTag(writer);
  
  
          if (scriptId != null)
              write(scriptId);
  
          // Evaluate the remainder of this page
          localRelease();
          return EVAL_PAGE;
      }
docs: Render the end of the IMG tag.
  @throws JspException if a JSP exception has occurred