Hi
The below code works fine using JSTL
<H3> This is an example for JSTL </H3>
<c:forEach var = "myBean" items= "${requestScope.LukeObject}" varStatus ="MyBeanCounter">
Bean value of ${MyBeanCounter.count} is ${myBean.intA}
</c:forEach>
This is an example for JSTL
Bean value of 1 is 0 Bean value of 2 is 1 Bean value of 3 is 2
But the below code is not working (useBean && JSTL combination)
<H3> This is an example for useBean </H3>
<
jsp:useBean id ="myJSPBean" class ="Foo.Bean" scope ="request"/>
<c:forEach var ="myJSPBearVar" begin = "1" step = "1" items = "${myJSPBean}">
Bean value of ${begin} is ${myJSPBearVar.intA}
</c:forEach>
I get the below error
javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach>
Can any one help me out how to use useBean and forEach together?
Thanks
Luke
[ October 11, 2005: Message edited by: Luke ]