Forums Register Login

The order of doEndTag, popBody

+Pie Number of slices to send: Send
Seems everybody agrees pusBody happens after doStartTag().
However, for doEndTag,popBody , I see different opinions.
Anybody there can help me?
Thanks!
P.Chen
+Pie Number of slices to send: Send
The pageContext.popBody() is called before the doEndTag() method is called, and only when there are no more evaluations of doAfterBody().
Simon
+Pie Number of slices to send: Send
For a descriptive one, you can hit
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags7.html#68637
----------
Hafizur Rahman
SCJP
+Pie Number of slices to send: Send
I agreed with Simon that the popBody is called before doEndTag.
JSP.10.1.2.4 Methods
public int doAfterBody()
. . .
If doAfterBody returns EVAL_BODY_AGAIN, a new evaluation of the body will happen (followed by another invocation of doAfterBody).
If doAfterBody returns SKIP_BODY no more body evaluations will occur, the value of out will be restored using the popBody method in pageContext, and then doEndTag will be invoked.
. . .
+Pie Number of slices to send: Send
* is pageContext.popBody() called by doEndTag() method?
* what to call pageContext.pushBody()?
See where your hand is? Not there. It's next to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 898 times.
Similar Threads
Help on PageConext
pushBody & popBody
pushBody() and popBody
EVAL_BODY_BUFFERED - Yet again
Eduardo Cobian's mock question 18
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:23:14.