wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doAfterBody Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doAfterBody" Watch "doAfterBody" New topic
Author

doAfterBody

Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
Question

In which of the following cases will the method doAfterBody() of a tag handler be invoked?
A. This method will be called only when doStartTag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED
B. This method will be called if doAfterBody returns IterationTag.EVAL_BODY_AGAIN


This answer is B. I think A is correct too if the 'only' word is removed.
Right ?

Thanks
Shiang


SCBCD, SCWCD, SCJP
Arut Jothi
Greenhorn

Joined: Nov 11, 2004
Posts: 2
When doStartTag() returns BodyTag.EVAL_BODY_BUFFERD, setBodyContent() would be called and then doInitBody() would be called then finally doAfterBodyTag would be called.

So only answer B is correct.

Please refer HF book also for more info.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: doAfterBody
 
Similar Threads
doAfterBody()
Regarding Classic Custom Tags
One Tag Question
When is doAfterBody called?
Doubt on doAfterBody()