O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

With BodyTag, you get two new methods

When you implement BodyTag (by extending BodyTagSupport), you get two more lifecycle methods—setBodyContent() and doInitBody(). You also get one new return value for doStartTag(), EVAL_BODY_BUFFERED. That means there are now three possible return values for doStartTag(), instead of the two you get when you extend TagSupport.

Lifecycle for a tag that implements BodyTag (directly or by extending BodyTagSupport)

image with no caption

Note

A change in the default return value for BodyTagSupport:

image with no caption

New return value, and it’s the default for BodyTagSupport. (Instead of SKIP_BODY, the default for TagSupport.)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required