struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Humphrey" <Humphr...@Kakari.com>
Subject logic:iterate tag fails on large dataset, succeeds on small one?
Date Mon, 21 Jul 2003 17:57:49 GMT

I am trying to do a very simple data-display web application using Struts, with MySQL on the
back end.

Basically, I take a ResultSet and its ResultSetMetaData and put it into some beans.  I have
a
TableDataView object which contains a FieldList and a RecordCollection.  FieldList has a property
called fields which returns a List.  RecordCollection implements Collection, and containts
an
ArrayList of Record objects; Record returns an array of the field value objects as the property
fieldValues.

My JSP page(showtable.jsp)looks like:

<html:html>
<TABLE>
<TR>
<logic:iterate id="fields" name="tableDataView" property="fieldList">
<TH><bean:write name="fields" /></TH>
</logic:iterate>
</TR>
<logic:iterate id="record" name="tableDataView" property="recordList">
<TR>
<logic:iterate id="fvalues" name="record" property="fieldValues">
<TD><bean:write name="fvalues" /></TD>
</logic:iterate>
</TR>
</logic:iterate>
</TABLE>
</html:html>

If I run this on a small table, with 10 fields and 11 records, it works fine.  If I run it
on a
large table, with 28 fields and 307 records, then I get:

javax.servlet.ServletException: cannot find bean fvalues in any scope
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:533)
        at org.apache.jsp.showtable_jsp._jspService(showtable_jsp.java:192)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
...[deletia...I can't imagine that any of it has anything to do with my error]
        at java.lang.Thread.run(Thread.java:536)

I can eliminate this problem if I reduce the number of fields in the table to 9 or 10,
but I can't see why this should be a problem, and certainly not why my looping bean
should suddenly become unavailable.  My unit tests seem to be telling me that my
Record bean should be properly returning a list of 28 field values.  I don't know at
what point things are breaking down.  I'm not experienced with JSP tag programming,
so I haven't been able to learn much from IterateTag.java, or the compiled version
of showtable.jsp.  Any pointers on my problem would be much appreciated.




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message