I'm using Resin 2.1.5 here. I thought mabye I might be using a outdated version of the JSTL taglib, so I downloaded 1.0.2 and redeployed the webapp. No change in the results. Gonna give it a shot with Tomcat here and see. The plot thickens....

-tim

On Monday, November 11, 2002, at 02:54 PM, Kris Schneider wrote:

TC 4.1.14 + Standard Taglib 1.0.2:

<p>Begin the count</br>
  <c:forEach var="i" begin="1" end="1">
    <c:out value="${i}"/>: one row here...<br>
  </c:forEach>
</p>

<p>Begin the count</br>
  <c:forEach begin="1" end="1" varStatus="count">
    <c:out value="${count.count}"/>: one row here...<br>
  </c:forEach>
</p>

Produces:

Begin the count
1: one row here...

Begin the count
1: one row here...

Quoting Henri Yandell <[EMAIL PROTECTED]>:

So, suggests that there's a bug with forEach when begin equals end, it
should print out once. JSTL people? :)

Hen

On Mon, 11 Nov 2002, Timothy Kettering wrote:

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

Begin the count</br>

	<c:forEach begin="1" end="3" varStatus="count">
		<c:out value="${count.count}"/>: one row here...<br>
	</c:forEach>



Begin the count
1: one row here...
2: one row here...
3: one row here...


On Monday, November 11, 2002, at 02:27 PM, Henri Yandell wrote:



It looks like a bug to me, but I'm obviously not the right person for
that
:) What does start="1" end="3" return? 2 or 3? I figure that whichever
one
of the three tests is unmatched, that's the bug.

To get 1 value out, how about just using c:set?

[not that I know what varStatus is. Not one I thought I'd used. ]

Hen

On Mon, 11 Nov 2002, Timothy Kettering wrote:

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>



--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@;jakarta.apache.org>


--
Kris Schneider <mailto:kris@;dotech.com>
D.O.Tech <http://www.dotech.com/>

--
To unsubscribe, e-mail: <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>

Reply via email to