You *do* have a taglib directive for the logic taglib in the page, right? Mark Conlin wrote:
Thanks folks, but that does not work either.
So I tried the code from the example in the struts developers Guide.
It doesn't work either.
<%
java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE);
%>
<logic:iterate id="myCollectionElement" name="list"> Element Value: <bean:write name="myCollectionElement" />
<br />
</logic:iterate>
This code results in the following error:
[ServletException in:admin/admin_home.jsp] Cannot find bean myCollectionElement in any scope'
Any Ideas?
-----Original Message-----
From: Kris Schneider [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 15, 2002 4:47 PM
To: Struts Users Mailing List
Subject: Re: Iterate tag Tomcat 4.1.12, issue or no?
<%
SessionUtility su = new SessionUtility();
ArrayList messages =
(ArrayList)su.getAttribute(session, HomeConstants.MESSAGE_ARRAY);
pageContext.setAttribute("messages", messages);
%>
<logic:iterate id="myMessage" name="messages">
Mark Conlin wrote:
I am afraid that still does not work.
None of these work....
<logic:iterate id="myMessage" collection="<%=messages%>">
<logic:iterate id="myMessage" collection=<%=messages%>>
<logic:iterate id="myMessage" collection="messages">
-----Original Message-----
From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 15, 2002 7:22 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: Iterate tag Tomcat 4.1.12, issue or no?
On Sun, 15 Dec 2002 15:39:23 -0500
"Mark Conlin" <[EMAIL PROTECTED]> wrote:
<%= messages.size() %>
<logic:iterate id="myMessage" collection="<%=messages%>">
<%= myMessage.getSubject() %>
</logic:iterate>
Try collection="messages" (without the scriplets).
-- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

