On page 323 (Table 16.8, chaper 16) of the SCWCD Exam Study Kit, the author states that the EVAL_BODY_BUFFERED constant can be returned by doStartTag() and doAfterBody(), for tags that implement the BodyTag interface. Is that really true? I cannot find proof of this in the Servlet API nor the servlet spec. From reading these, I am led to belive that only IterationTag.EVAL_BODY_AGAIN or Tag.SKIP_BODY can be returned by doAfterBody(), even when the tag implements the BodyTag interface. Am I correct?
I am studying for the 1.3 test, not the 1.4 beta, so I am only looking at version 1.2 of the JSP spec.
Sorry, I missed the second part of the question. doAfterBody() is of course defined in the IterationTag interface and can return Tag.SKIP_BODY or IterationTag.EVAL_BODY_AGAIN. BodyTag interface extends IterationTag and inherits the doAfterBody() method. The reason a tag implementing BodyTag can return BodyTag.EVAL_BODY_BUFFERED from doAfterBody() is that BodyTag.EVAL_BODY_BUFFERED is defined to have the same value (i.e., 2) as IteraionTag.EVAL_BODY_AGAIN. So in the context of BodyTag.doAfterBody() they mean the same thing. The explanation is kind of messy, but the book is correct.