Not in Struts itself but have you seen JSTL? it has a <c:choose ..> tag which does exactly what u r looking for.
Affan ----- Original Message ----- From: "Suresh Addagalla" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Monday, January 06, 2003 7:18 PM 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>