Ylva Degerfeldt wrote:
Hi everyone,

I'm using Struts 1.2 (bundled with NetBeans 5.5.1) and I've noticed
that I can't iterate through a java.util.Set using the logic:iterate
tag.
The code that I've tried:

<logic:iterate collection = "skillsFound" id= "thisSkill" scope = "session">

I get this exception: javax.servlet.ServletException:
javax.servlet.jsp.JspException: Cannot create iterator for this
collection

Does anyone know if this is a bug of Struts 1.2 and if there's a later
version (not Struts 2) where it's been fixed?

I'd really appreciate an answer to this!

Thanks in advance!

/Ylva

Sets are unordered, so I believe both Struts's iterate and JSTL forEach tags treat them as non-iterable, even though they do implement Collection. If you can expose skillsFound.iterator() as a scripting variable or page/request scoped attribute to pass into logic:iterate that might work.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to