<snip> what is the difference between having a scriptlet or what you use above? </snip>
Hehe I rather agree Jim! (Mind you I am rather anti-JSP so my view is probably a bit biased!) Your question reminds me of an old article I read several months ago by Jason Hunter (author of the O'Rielly Servlet book) written back at the dawn of time (or to be more precise in the year 2000). http://www.servlets.com/soapbox/problems-jsp.html The quote that stuck in my mind was: <snip> Someday there will be custom tags for doing these loops. And custom tags for "if" checks too. And JSP pages may look like a grotesque Java reimplemented with tags </snip> Hmmm?????? <c:if test="${(count == 0) || (count == 2) || (count == 4)}"> ... do something ... </c:if> -----Original Message----- From: Jim Collins [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 14:29 To: Struts Users Mailing List Subject: Re: if condition with "or" ----- 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>