A
Angus McIntyre
I have a JSP that contains the following fragment:
<%
com.example.bbfront.Segment[] segments =
(com.example.model.Segment[])
session.getAttribute("segments");
%>
<table>
<logic:iterate id="segment"
collection="<%= segments %>"
type="com.example.model.SegmentImpl">
<tr>
<td><bean:write name="segment" property="id" /></td>
<td><bean:write name="segment" property="price" /></td>
</tr>
</logic:iterate>
</table>
The 'segments' attribute is bound to an array of Segment (Segment is an
interface, SegmentImpl is a class implementing that interface).
If I invoke this with a single element in the array, the id and price of
the segment are printed out in the page just as I would hope and expect.
If I invoke it with two or more elements in the array, the JSP fails
with an error message that signals a 'root cause'
Cannot find bean segment in any scope
This seems a little bizarre to me. Can anyone offer any suggestions, or
point out the obvious mistake?
Thanks,
Angus
<%
com.example.bbfront.Segment[] segments =
(com.example.model.Segment[])
session.getAttribute("segments");
%>
<table>
<logic:iterate id="segment"
collection="<%= segments %>"
type="com.example.model.SegmentImpl">
<tr>
<td><bean:write name="segment" property="id" /></td>
<td><bean:write name="segment" property="price" /></td>
</tr>
</logic:iterate>
</table>
The 'segments' attribute is bound to an array of Segment (Segment is an
interface, SegmentImpl is a class implementing that interface).
If I invoke this with a single element in the array, the id and price of
the segment are printed out in the page just as I would hope and expect.
If I invoke it with two or more elements in the array, the JSP fails
with an error message that signals a 'root cause'
Cannot find bean segment in any scope
This seems a little bizarre to me. Can anyone offer any suggestions, or
point out the obvious mistake?
Thanks,
Angus