11.6. New Names for Return Values

In JSP 1.1, the EVAL_BODY_TAG constant was used in two totally different situations. First, it was returned from the doStartTag method of TagSupport or BodyTagSupport to indicate that the tag body should be made available in doAfterBody. The default doStartTag method of BodyTagSupport returned this value. Second, it was returned from the doAfterBody method of TagSupport or BodyTagSupport to indicate that the body should be reevaluated.

This dual use of EVAL_BODY_TAG was confusing because it indicated a single evaluation in the first case and multiple evaluations (as in iterative tags) in the second case. To better differentiate the two situations, in JSP 1.2 you return EVAL_BODY_BUFFERED from doStartTag to indicate that the tag body should be made available in doAfterBody. You return EVAL_BODY_AGAIN from doAfterBody when you want to reevaluate the body.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.232.152