tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Agrawal, Anuj (Anuj)** CTR **" <agra...@lucent.com>
Subject RE: multiple conditions for an IF statement
Date Tue, 12 Mar 2002 02:17:00 GMT
Hmm... i tried (accidentally) doing:
	<c:if test="$(b1 && b2)">
		TRUE
	</c:if>
and that WORKED!

So i guess i'd like to know:
1. should i be using {} or ()?
2. is the syntax (AND or &&) dependent on which "style" of brackets i use?
3. where is this all documented?

Thanks again.

> -----Original Message-----
> From: Ryan Lubke [mailto:Ryan.Lubke@Sun.COM]
> 
> I believe the nightly builds of JSTL should be able to support what
> you're trying to accomplish:
> 
> <c:if test="${b1 and b2}">
>     TRUE
> </c:if>
> 
> Please take note of the syntax change when specifying an EL value for
> an attribute (${...}).  The EL has changed in the recent 
> builds of JSTL.
> 
> -rl
> 
> On Sat, 2002-03-09 at 13:35, Agrawal, Anuj (Anuj)** CTR ** wrote:
> > I'd like to use the JSTL <c:if test=""> (or <c:when 
> test="">)action, but the
> > test i'd like to perform is not a single conditional statement.
> > 
> > For example, i want to do:
> > 
> > <%
> > 	if (x==0 && y==4) {
> > 		// do something
> > 	}
> > %>
> > 
> > I was able to do:
> > <c:if test="$x == 0">
> > something happens here
> > </c:if>
> > 
> > but not:
> > <c:if test="$x==0 && $y==4">
> > something happens here
> > </c:if>
> > 
> > I tried variations of this, but no dice. 8(
> > Anybody?

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


Mime
View raw message