I've been banging my head on this for a bit, and I'm not sure if its
me, or a bug in the functionality. I'm attempting to use JSTL to
iterate over an array of results, and heres what I'm doing.
Heres a simple example:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Begin the count</br>
<c:forEach begin="1" end="1" varStatus="count">
<c:out value="${count.count}"/>: one row here...<br>
</c:forEach>
which gives me a result of this:
Begin the count
Then if I change it to:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Begin the count</br>
<c:forEach begin="1" end="2" varStatus="count">
<c:out value="${count.count}"/>: one row here...<br>
</c:forEach>
I get this:
Begin the count
1: one row here...
2: one row here...
My question is.. how do I do this to get just one row printed? Its
either zero, or then two, and works fine after that. Sometimes my page
wants to return just one result, and no matter how i diddle with stuff
here, I always end up with either a blank page, or a single row that
prints correctly, and then a empty row, which isn't what i want. Am I
missing something here?
-tim
--
To unsubscribe, e-mail: <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>
- How to close a database connection with JSTL? Johann Uhrmann
- Re: How to close a database connection with JSTL? Hans Bergsten
- Re: How to close a database connection with JST... Johann Uhrmann
- Re: How to close a database connection with... Hans Bergsten
- Re: Properly iterating results with c:forEa... Timothy Kettering
- Re: Properly iterating results with c:f... Henri Yandell
- Re: Properly iterating results wit... Timothy Kettering
- Re: Properly iterating results... Henri Yandell
- Re: Properly iterating res... Kris Schneider
- Re: Properly iterating res... Timothy Kettering
- Re: Properly iterating res... Kris Schneider
- Re: Properly iterating res... Timothy Kettering
