Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Tag library bodyContent is null

Sam Adams

2005-08-17


Hi,

I'm trying to greate a taglib that loops through the the body twice.
There may be html in the body and I don't want that to be printed on the
first iteration, only the second. I have the loop working fine I'm just
stuck on the part about not printing the elnlosed html twice. How can
this be achieved? I thought that I could maybe do something like:

public int doAfterBody() throws JspException {
try {
  BodyContent body = getBodyContent();
  body.clearBody();
  .....

But getBodyContent() always seems to return null. Any ideas?

Thanks.

-Sam

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.