jQuery in Action, 3rd edition
The moose likes Struts and the fly likes problem in logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in logic:iterate" Watch "problem in logic:iterate" New topic

problem in logic:iterate

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

this is my jsp
<logic:iterate id="emp1" name="encash_trans">

<tr align="left">
<td ><bean:write name="emp1" property="appliedDays"/></td>
<td ><bean:write name="emp1" property="encashDate"/></td>
<td ><bean:write name="emp1" property="amountPaid"/></td>

my DTO class called Employee

class Employee{
//variable declaration

public String getAppliedDays(){
return appliedDays;
public String getEncashDate(){
return encashDate;
public String getAmountPaid(){
return amountPaid;
//here my setter method


this is my Action class

ArrayList emp1=EmployeeDAO.getEncashStatement(employee,getDataSource(request));

my DAO class(return type ArrayList)

while(rs.next()) {


now, when i try to use logic:iterate for looping..in my jsp

i did not get the output...what value i have to give in property attribute of writ:bean...

please anyone can explain me...

thanks & regards,
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
Your iterate tag is fine.First print ArrayList emp1 on console and check data is stored in Arraylist or not.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi Naik ..

thanks for reply.. you are right..i did some mistake in DAO class..(i did not put rs.getString(),i put DataBase column name )


thanks and regards,
I agree. Here's the link: http://aspose.com/file-tools
subject: problem in logic:iterate
It's not a secret anymore!