Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with Jsp: logic:iterate Cannot create iterator for this collection

843836Dec 7 2004 — edited Jul 11 2010
Hello,

I am developing a jsp with struts. This is the snap of the code:
        <logic:iterate id="prod" collection="productList" >
		<tr align="center">
			<td><html:text property="prodDesc" size="50" indexed="true"/></td>
			<td>
				<html:select property="prodUnit" indexed="true">
					<option selected>-</option>
			    	<OPTION VALUE='NMB'>NMB
					<OPTION VALUE='TEN'>TEN
					<OPTION VALUE='TPR'>TPR
					<OPTION VALUE='GWH'>GWH
				</html:select>
			</td>
			<td><html:text property="prodQty" size="20" indexed="true"/></td>
			<td><html:text property="prodVal" size="20" indexed="true"/></td>			
		</tr>
        </logic:iterate>
"productList" is defined as an array of Product[], "prod" is defined as a single Product object in the form. But when i run the page, it gives me this errors:
"javax.servlet.jsp.JspException: Cannot create iterator for this collection".
I also tried to make "productList" an ArrayList type, but it game me this same error.

We are using Websphere 4.0 with Struts 1.1.


Anyone can help?
Thanks a lot.


All the best,
warren
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2010
Added on Dec 7 2004
8 comments
2,372 views