jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Using Logic:iterate with an string array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Logic:iterate with an string array" Watch "Using Logic:iterate with an string array" New topic
Author

Using Logic:iterate with an string array

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi All,

I need to iterate over an string array. I have my setter and getter methods declared in FormBean.

In form bean
private String[] first;

//Corresponding setter and getter methods.

In the action i populate the Formbean

I need to iterate this string array and show the result.

Can any one help how to iterate over an string array.

Thanks in advance

Regards,
Arul.
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
<logic:iterate name="FormBean" property="first" id="currentElement">
<bean:write name="currentElement"/>
</logic:iterate>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Logic:iterate with an string array
 
Similar Threads
How to store an image from a jsp page to Database
problem with struts2 checkbox
Precheck the CheckBox
Struts Multiselect to Hidden Field
Clarification for jstl <c:foreach> tag