struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Iterate tag Tomcat 4.1.12, issue or no?
Date Sun, 15 Dec 2002 23:59:18 GMT
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:kris@dotech.com] 
> 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:maillist@reumann.net] 
>>Sent: Sunday, December 15, 2002 7:22 PM
>>To: Struts Users Mailing List
>>Cc: meconlin@yahoo.com
>>Subject: Re: Iterate tag Tomcat 4.1.12, issue or no?
>>
>>On Sun, 15 Dec 2002 15:39:23 -0500
>>"Mark Conlin" <meconlin@yahoo.com> wrote:
>>              
>>
>>
>>><%= messages.size() %>
>>>           
>>><logic:iterate id="myMessage" collection="<%=messages%>">
>>><%= myMessage.getSubject() %>
>>></logic:iterate>
>>
>>
>>Try collection="messages" (without the scriplets).
>> 
>>
> 
> 

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message