Given the following code:

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

<c:if test="${param.one}">
FOOO
</c:if>

<c:choose>
 <c:when test="${param.two}">
   <c:out value="BING"/>
 </c:when>
 <c:when test="${param.one}">
   <c:out value="BONG"/>
 </c:when>
 <c:otherwise>
   <c:out value="BANG"/>
 </c:otherwise>
</c:choose>

I was kind of hoping that I might be able to test whether a parameter was
passed in. So if I call that code as:

http://orinoco.flamefew.net:8013/timetracker/testIf.jsp?one=one

I get an output of BANG, and not FOOOBONG as I'd expect.
I've just upgraded from standard 1.0 to 1.0.2, and am using tomcat 4.0.4,
so figure it must be something I'm missing about jstl.

[On the offchance, I also tried with just ${one}/${two}.
 I don't quite get why the Request couldn't have been in the lookup-path
 for a normal variable. Well maybe I do, seem to recall parameters aren't
quite as mutable as an attribute is. ]

Hen


--
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