----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 12:20 AM
Subject: Re: if condition with "or"


>
>
> On Wed, 4 Dec 2002, Jana Navaneethan wrote:
>
> > Date: Wed, 4 Dec 2002 17:23:42 -0500
> > From: Jana Navaneethan <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: if condition with "or"
> >
> > Hi,
> >       I want to use <logic:equal> in my JSP to replace the following
code.
> >
> > if  (count = 0 || count = 2 || count = 4)
> > do something.....
> >
> > How to achieve this using <logic:equal> By the count is index value of
the
> > iterator i.e indexId.
> >
>
> This is one of the very large number of reasons that you should start
> using JSTL if you can (i.e. you're on a Servlet 2.3/JSP 1.2 or later
> container):
>
>   <c:if test="${(count == 0) || (count == 2) || (count == 4)}">
>     ... do something ...
>   </c:if>
>
Hi Craig I remember seeing one of you posts where you say you are against
having java code in a JSP but what is the difference between having a
scriptlet or what you use above?

Regards

Jim.
>
> > Thanks in advance,
> > Jana.
> >
>
> Craig
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to