Here's the code:
In the JSP is as follows :
<logic:iterate id="reportList" name="reportRequestForm" property="reportList">
<TR align="left">
<TD class="table_cell">
<bean:write name="reportList" property="reportID" filter="true"/>
</TD>
<TD>
<bean:write name="reportList" property="reportRequestID" filter="true"/>
</TD>
<TD>
<bean:write name="reportList" property="submitDate" filter="true"/>
</TD>
<TD>
<bean:write name="reportList" property="statusCode" filter="true"/>
</TD>
<TD>
<bean:write name="reportList" property="criteria" filter="true"/>
</TD>
</TR>
</logic:iterate>
</TR>
</TABLE>
The Form class called RequestReportForm reads as follows:
ArrayList reportList = null;
public void setReportRequestID( int reportRequestID ){this.reportRequestID = reportRequestID; }
public void setReportID( String reportID){this.reportID = reportID; }
public void setStatusCode( String statusCode){this.statusCode = statusCode; }
public void setSumbitDate( String sumbitDate){this.sumbitDate = sumbitDate; }
public void setCriteria( String criteria){this.criteria = criteria; }
public void setReport( String report){this.report = report; }
public String getReportRequestID(){ return Integer.toString(reportRequestID); }
public String getReportID(){ return reportID; }
public String getStatusCode(){ return statusCode; }
public String getSumbitDate(){ return sumbitDate; }
public String getCriteria(){ return criteria; }
public String getReport(){ return report; }
public void setReportList( ArrayList reportList){
this.reportList = reportList;
}
public ArrayList getReportList(){
return reportList;
}
The Action reads as follows : It fires a sql query that returns a ArrayList
else if (request.getParameter("submit").equalsIgnoreCase("Refresh ")){
ReportStatusQuery q = new ReportStatusQuery();
ArrayList reportList = q.getReportStatus();
f.setReportList(reportList);
session.setAttribute("reportList",reportList);
}
The DAO code snippet is as follows:
public void handleResultSet( ResultSet r ) throws SQLException {
while( r.next() ) {
//rsb = new ReportStatusBean();
rsb = new ReportRequestForm();
rsb.setReportRequestID( r.getInt( 1 ) );
rsb.setReportID( r.getString(2));
rsb.setStatusCode(r.getString(3));
rsb.setSumbitDate(r.getDate(4).toString());
rsb.setCriteria(r.getString(5));
System.out.println(" Request id : " + rsb.getReportRequestID() );
al.add(rsb);
}
}
The stuts.config entry is
I'm getting the error : Servlet Error]-[No collection found]: javax.servlet.jsp.JspException: No collection found