Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes write to output in the doAfterBody Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "write to output in the doAfterBody" Watch "write to output in the doAfterBody" New topic

write to output in the doAfterBody

chris noe

Joined: Aug 20, 2003
Posts: 14

I'm studying for the SCWCD exam and i'm a bit confused about the following :
Can someone tell me the difference between :

JspWriter wrt = getBodyContent.getEnclosingWriter();
JspWriter wrt = getPreviousOut();
JspWriter wrt = getPageContext.getOut();

in the doAfterBodyMethod of a class extending the BodyTagSupport.
Doesn't all the 'wrt' write to the same output ?

I agree. Here's the link:
subject: write to output in the doAfterBody
Similar Threads
write to output in the doAfterBody() method
doAfterBody() is not executed using BodyTagSupport
A proble writing byte array to client in JSP
Outputting help
sending html to the browser whilst an intensive operation proceeds