File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes 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 "logic:iterate  Tag" Watch "logic:iterate  Tag" New topic

logic:iterate Tag

Gopinath Reddy

Joined: Oct 30, 2005
Posts: 3
I having array list having values of Vendor name from database and i am setting that value in session.


I am getting this value in JSP page using the code given below

vendorArrLst = (ArrayList)session.getAttribute("vendorname");

I need to get the value from the ArrayList(vendorArrLst) and display the values using logic:iterate tag in my JSP page.

kindly explain me the above case with help of coding.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Here's a link to the documentation on the logic:xxxx tags.

Give it a try, and see what you come up with. If it doesn't work, and you still need help, let us know.

Personally, though, I've stopped using logic:xxx tags in favor of JSTL (Java Standard Tag Library) as they are more standard. Here's a link on JSTL:

You can also google "JSTL tutorial" and get a number of other good links.

Consultant, Sima Solutions
pankajjj jain

Joined: Oct 12, 2005
Posts: 14

Try the following code and if you still have any problem.then contact me

<%@ taglib uri="struts/logic-l" prefix="logic-l" %>
<logic-l resent name="vendorArrLst " >
<bean:size id="size" name="vendorArrLst " />

<logic-l:greaterThan name="size" value="0">
<bean:write name="size"/>
<logic-l:iterate id="lt" name="vendorArrLst ">
<bean:write name="lt"/>
</logic-l resent>
I agree. Here's the link:
subject: logic:iterate Tag
It's not a secret anymore!