• Post Reply Bookmark Topic Watch Topic
  • New Topic

using forEach tag in JSP  RSS feed

 
ashwin bala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am trying display the result set from the database.I am getting the following exception :

Caused by: javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach>
at org.apache.taglibs.standard.tag.common.core.ForEachSupport.toForEachIterator(ForEachSupport.java:286)

My Jsp code :


My servlet code


My bean class is



and my web.xml is


Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are sending a single test bean in a scoped variable; which, of course, you cannot iterate over. Should you not be putting many beans in a List? One bean for each row in the resultset?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!