public int doAfterBody() throws JspException { if (iterator.hasNext()) { setAttribute(); return IterationTag.EVAL_BODY_AGAIN; } else { try { bodyContent.writeOut(bodyContent.getEnclosingWriter()); return SKIP_BODY; } catch (IOException ioe) { throw new JspTagException(ioe.getMessage()); } } }