The Struts logic tags do not provide if...then...else -- you can certainly simulate that by using the "not" versions of the tags -- the if-then-else logic can be implemented like the following:
<logic:equal> 'if' markup here </logic:equal> <logic:notEqual> 'else' markup here </logic:notEqual> The decision was made (and I believe the appropriate decision) that the tags should be kept as generic and simple as possible ... there are if-then-else tags available from other parties but I would stick with the basic struts tags and/or JSTL for this kind of stuff. -----Original Message----- From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:19 AM To: 'Struts Users Mailing List' Subject: RE: Struts equivalent of if...else (newbie) Well, as you guessed, I do have scriptlets. Now my effort is to minimize or remove them completely. And I tried to use logic with local variables, it worked. Thanks for that. And still, logic:equal offers only if..then; is there any way to simulate if..then..else? Thanks, Suresh >-----Original Message----- >From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] >Sent: Monday, January 06, 2003 7:41 PM >To: 'Struts Users Mailing List' >Subject: RE: Struts equivalent of if...else (newbie) > > >I believe that the logic tags will work with a local variable >-- anyway, if you don't want to use scriptlet, how did you >create the local variable in the first place? > >-----Original Message----- >From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] >Sent: Monday, January 06, 2003 8:59 AM >To: [EMAIL PROTECTED] >Subject: Struts equivalent of if...else (newbie) > > >Hi, > >I would like to know if Struts provides a custom tag for >achieving if..then..else functionality. > >I can not use logic:equal because the data for me is NOT >coming from either a bean or through the request. I just need >to compare a variable. Is there any option apart from writing >a cryptic looking scriptlet? > >Thanks, >Suresh > > >-- >To unsubscribe, e-mail: ><mailto:struts-user->[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]>