The addition to the body happens in the standard part of the tag lifecycle.
I would suggest you go and read the
API Docs on the body tag to find out about its lifecycle. Basically the tag is designed so that it will do work behind the scenes, and let you have control at certain points in the lifecycle.
The tag executes the body (as part of its lifecycle) which writes to the BodyContent object, and then calls the doAfterBody() method do find out what you want to do next.
The bodyContent variable itself doesn't change, but its not immutable. Its contents can be written to - which is what the "DO BODY" part of the lifecycle would do.
Also note that you are using constants that don't exactly fit with the Body tag.
EVAL_BODY_TAG has been deprecated.
You should instead use EVAL_BODY_BUFFERED (has the same constant value, so it currently works).
The doAfterBody method should return EVAL_BODY_AGAIN rather than EVAL_BODY_TAG.
I guess thats just a really old article?