Hi Mark, Hebert,
in which of the following cases a BodyContent object will be "pushed" into the pageContext?
I find this question rather vague. First of all a BodyContent object is only created when the doStartTag() method returns EVAL_BODY_BUFFERED.
The next thing is that, when you read the API of the PageContext:
public BodyContent pushBody()
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.
public JspWriter popBody()
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.
So I would say: the BodyContent is pushed
from the PageContext (by calling pushBody()) and handed over to your TagHandler code, and never
into.
My first reaction would be answer B, but questions remain about the question itself....
Regards,
Frits