troubleshooting Question

iterate tag doesn't evaluate HTML

Avatar of tekel
tekel asked on
Java
11 Comments1 Solution460 ViewsLast Modified:
hi all,

I created my own iterate tag.  the problem is that it recognizes the nested tags within the body of the iterate tag, but not the HTML.

here is what I mean. say I have the following :

<mytag:iterate>
     <mytag:item property="name"/> <p>
     <mytag:item property="number"/> <p>
     <hr>
</mytag:iterate>

the "name" and the "number" of the items are printed okay, but the <p> and the <hr> are never seen.  i.e the "name" and "number" are bunched up together and not separated.

on my tld I have:
<name>iterate</name>
     <tagclass>com.util.IterateTag</tagclass>
<bodycontent>JSP</bodycontent>

I've set the bodycontent tag to JSP which I assumed would evaluate the HTML.


in my Iterate tag I have:
public int doAfterBody() throws JspException {
try {
     BodyContent bc = getBodyContent();
     getPreviousOut().print(bc.getString());
     bc.clearBody();
     ...
}
I'm not sure what the above code does. I got this from an example. could this be causing the problem?

thanks,
- tekel
ASKER CERTIFIED SOLUTION
jerch

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros