JSP Struts <logic:equal> tag questions

From: Raymond Lee (raymondwlee_at_hotmail.com)
Date: 10/31/04


Date: 30 Oct 2004 20:28:02 -0700

I want to know if I use <logic:equal> tag, I need to take care all
different cases. Looks like there are no else tag in Struts.

For example, in JSP scriplets without Struts, I may do this:

<%
 if (returnValue.equals("0")
 { ...
 }
 else //means returnValue="1"
 { ...
 }
%>

But in Struts, I need to do this:
<logic:equal name= "returnValue " value= "0 " >
...
</logic:equal >

<logic:equal name= "returnValue " value= "1 " >
...
</logic:equal >

//etc...

In this case, that is fine. But if there are so many different cases,
it is tedious to specify all possiblitites in order to use
<logic:equal> tag.

Please discuss and advise. Thanks!!



Relevant Pages

  • struts 2 & SF Display tag issues
    ... Am very new to struts - so please forgive any misconceptions/errors ... Am using the display tag from sourceforge ... Secondly - I assumed that in a JSP 2.0/2.1 container - EL expression ... that utilise runtime/EL expressions - hence tlds like ...
    (comp.lang.java.programmer)
  • Re: Struts tag ?
    ... HTML-form element with an ActionForm in Struts. ... JAR with 'photo tf' and see if the label tag thunder is even in there. ... What demoralizes if you just use a venerable HTML tag instead of the ... "The War Party may have gotten its war," he writes. ...
    (comp.lang.java.programmer)
  • Struts: XHTML support
    ... We're using Struts 1.1, which has an "xhtml" attribute for the ... rendered html tag, which is not allowed in xhtml 1.1. ... "name" attribute in the form tag, ...
    (comp.lang.java.programmer)
  • My favorite JSP tag lib is .. DisplayTag.sf.net
    ... Here is my favorite tag: http://displaytag.sf.net and see examples (in upper ... Grid, Sorting, nested, group, export, everything you like, plus it's ... Advanced Struts Training Server Side Java training with Rich UI, mentoring, designs, samples and project recovery in North East. ...
    (comp.lang.java)
  • Re: Object <-> XML <-> web-form in servlet..
    ... > mentioning forms, Struts or similar tag ... > libraries are suggested, but when I looked ...
    (comp.lang.java.programmer)