This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I'm having trouble getting up to speed with JSTL. I'm trying to create a javax.servlet.jsp.jstl.sql.Result object in a bean, and then access it from a jsp page. It sounds simple enough, but I've yet to make it work. Here's what I'm doing. Here is the method in my class:
Here is how I'm trying to access it in my page:
When I run it, this is the error I get:
Don't know how to iterate over supplied "items" in <forEach>
There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
My apologies to all who were offended by Betty Crocker.
It was my understanding that the javax.servlet.jsp.jstl.sql.Result object was intended to wrap a ResultSet object to simplify its use in JSTL. Am I incorrect? Does this tag only relate to use with the <sql:*> library?
Perhaps it's the rows property of that interface that you wish to iterate over?
Justin Richardson
Greenhorn
Joined: Nov 04, 2005
Posts: 3
posted
0
Oh, maybe that's it. I'm stuck in the mentality of refering to the field names contained in a ResultSet. However, those methods don't exist in a Result. Thanks for setting me straight.