wood burning stoves
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Accessing Tag Body in Classic Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Accessing Tag Body in Classic Tag" Watch "Accessing Tag Body in Classic Tag" New topic

Accessing Tag Body in Classic Tag

Giju George
Ranch Hand

Joined: Jun 08, 2004
Posts: 333
How do I access the tag body in a classic tag. I have tried :-

BodyContent bc=getBodyContent();
System.out.println("Body Content1 :- "+bc);

and also

System.out.println("Body Content1 :- "+bodyContent);

inside the doStartTag() and doEndTag(). But in both cases it returns null . My tag extends BodyTagSupport. Do I have to implement any other method ???

SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA
Paul Croarkin
Ranch Hand

Joined: Sep 30, 2004
Posts: 106

BodyContent body = getBodyContent();
JspWriter out = body.getEnclosingWriter();

Thanks,<br /> <br />Paul Croarkin<br />SCEA 5, SCWCD, SCJP
I agree. Here's the link: http://aspose.com/file-tools
subject: Accessing Tag Body in Classic Tag
It's not a secret anymore!