File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes on logic:iterate tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "on logic:iterate tag" Watch "on logic:iterate tag" New topic

on logic:iterate tag

Saptarshi Chakraborty

Joined: Jul 26, 2007
Posts: 23
Dear friends
I have a query regarding bean:iterate tag.According to the rule we should use logic tag like this
<logic:iterate name="aForm" property="aproperty">
do something....

where "aForm" is a Form bean or any bean. and "aproperty" is a property of that bean.
Now can I use <logic:iterate> tag without any use of form bean. Like
I have a list from my action
(I can use any object instead of String elements).
In jsp I am getting the arrayList object
ArrayList AnArrayList=(ArrayList)request.getAttribute("AnArrayList");
Now what code should I write in my jsp using <logic:iterate > in order to get the elements of the ArrayList .
Does the approach change if I use HashMap in stead of ArrayList?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Saptarshi Chakraborty:
Now what code should I write in my jsp using <logic:iterate > in order to get the elements of the ArrayList?

Consultant, Sima Solutions
I agree. Here's the link:
subject: on logic:iterate tag
It's not a secret anymore!