code: public int doEndTag() throws JspException
      {
          String scriptId = null;
  
          ServletRequest req = pageContext.getRequest();
  
          if ((hasErrors()) || _hasError) {
              localRelease();
              return EVAL_PAGE;
          }
  
          // the parent was validated in the doStartTag call
          Tag parentTag = getParent();
          while (!(parentTag instanceof Select)) {
              parentTag = parentTag.getParent();
          }
  
          assert (parentTag instanceof Select);
          Select parentSelect = (Select) parentTag;
          if (parentSelect.isRepeater()) {
              if (!isRenderable(parentSelect))
                  return EVAL_PAGE;
          }
  
  
          // Generate an HTML <option> element
          //InternalStringBuilder results = new InternalStringBuilder(128);
          _state.value = _value;
  
          // we assume that tagId will over have override id if both
          // are defined.
          if (_state.id != null) {
              scriptId = renderNameAndId((HttpServletRequest) req, _state, null);
          }
  
          _state.disabled = _disabled;
  
          if (parentSelect.isMatched(_value))
              _state.selected = true;
  
          WriteRenderAppender writer = new WriteRenderAppender(pageContext);
          TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.OPTION_TAG, req);
          br.doStartTag(writer, _state);
  
  
          if (_text == null)
              write(parentSelect.formatText(_value));
          else {
              //@TODO: How should we report errors
              write(parentSelect.formatText(_text));
          }
          br.doEndTag(writer);
  
          parentSelect.addOptionToList(_value);
  
          if (scriptId != null)
              write(scriptId);
  
          // Continue evaluating this page
          localRelease();
          return EVAL_PAGE;
      }
docs: Process the end of this tag.
  @throws JspException if a JSP exception has occurred