This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1. You are overriding setBodyContent without setting the BodyContent anywhere. You need to at least call super.setBodyContent, or save the BodyContent into an instance variable. (If you don't use the BodyContent, it's not a problem)
2. The "page context's "out" is being pushed before doAfterBody is called. So when you use JspWriter out = pageContext.getOut();, you are not accessing the page's output stream, but the body buffer stream. That's why nothing is output to your client. You need to either output the body to the original "out", or get it directly with :
Here is a new version of your tag :
[ December 25, 2008: Message edited by: Christophe Verre ]