Assume that the tag has been properly configured to allow body content.
Which, if inserted at line 12, would cause the JSP code
<mytags:mytag>BodyContent</mytags:mytag> to output BodyContent?
A. return SKIP_BODY;
B. return EVAL_BODY_INCLUDE;
C. return EVAL_BODY_BUFFERED;
D. return BODY_CONTENT;
the correct answer given is option B i.e. EVAL_BODY_INCLUDE. regarding option C the book says "INVALID BECAUSE IT DIRECTS THE BODY OF THE TAG TO A BUFFER WHICH THIS TAG DOES NOT PROCESS ".
My question is to elaborate as to why option C is invalid
Secondly in the lifecycle(when BodyTagSupport is extended) it is shown in the book that if the doStartTag retursn EVAL_BODY_BUFFERED, the container calls setBodyContent(BodyContent) and then it calls doInitBody(). afterwards it EVALUATES BODY and calls doAfterBody. so that means if EVAL_BODY_BUFFERED is returned the body does get evaluated and it will also print whatever the above question says so OPTION C should also be right. the exact page where this lifecycle is given in the book is at page no. 563