Thank you, Laurie! But I'm going to switch to Struts 2 now so that issue is not so important anymore. Thanks anyway!
/Ylva On Wed, Jul 30, 2008 at 11:11 PM, Laurie Harper <[EMAIL PROTECTED]> wrote: > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]