I have just tried it and the outcome is quite interesting:
doInitBody() - not printabledoAfterBody() - body printabledoEndTag() - body printable
It seems that the BodyContent is not available before the first evaluation of the body!
this was my code (default behaviour of the BodyTagSupport is that the doStartTag() returns EVAL_BODY_BUFFERED so that we are sure that all 3 methods are called)
The calling
JSP:
and the following TLD entry:
and the following output:
doInit()doAfterBody()doEndTag()