>>>>> "Henri" == Henri Yandell <[EMAIL PROTECTED]> writes:
Henri> Given the following code:
Henri> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
Henri> <c:if test="${param.one}">
Henri> FOOO
Henri> </c:if>
Henri> <c:choose>
Henri> <c:when test="${param.two}">
Henri> <c:out value="BING"/>
Henri> </c:when>
Henri> <c:when test="${param.one}">
Henri> <c:out value="BONG"/>
Henri> </c:when>
Henri> <c:otherwise>
Henri> <c:out value="BANG"/>
Henri> </c:otherwise>
Henri> </c:choose>
Henri> I was kind of hoping that I might be able to test whether a parameter was
Henri> passed in. So if I call that code as:
Henri> http://orinoco.flamefew.net:8013/timetracker/testIf.jsp?one=one
Henri> I get an output of BANG, and not FOOOBONG as I'd expect.
Henri> I've just upgraded from standard 1.0 to 1.0.2, and am using tomcat 4.0.4,
Henri> so figure it must be something I'm missing about jstl.
Shouldn't it be the following instead?
<c:if test="${!empty param.one}">
FOOO
</c:if>
<c:choose>
<c:when test="${!empty param.two}">
<c:out value="BING"/>
</c:when>
<c:when test="${!empty param.one}">
<c:out value="BONG"/>
</c:when>
<c:otherwise>
<c:out value="BANG"/>
</c:otherwise>
</c:choose>
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED] ; SCJP
--
To unsubscribe, e-mail: <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>