• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EVAL_BODY_BUFFERED

 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class extends BoyTagSupport.
Inside the class there are setBodyContent() , doInitBody(), doAfterBody(), and doEndTag(), but WITHOUT doStartTag() method.

When I run it in the browser, I can see setBodyContent(),doInitBody() doAfterBody(), and doEndTag() all get invoked.

What I do not understand is that I do not provide doStartTag() method with return EVAL_BODY_BUFFERED, how come methods setBodyContent() and doInitBody() can be invoked?

Thanks in advance.
Tiffiny
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EVAL_BODY_BUFFERED is the default for classes extending BodyTagSupport.
 
Francisco Neto
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you extend BodyTagSupport class it overrides the doStartTag method returning the value EVAL_BODY_BUFERRED. So, you don't need to implement this method by yourself.

I hope it help!
Francisco.
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see.

Thank you very much for the qucik response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic