This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes compare more than one value using logic equal in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "compare more than one value using logic equal in struts" Watch "compare more than one value using logic equal in struts" New topic
Author

compare more than one value using logic equal in struts

gita bal
Greenhorn

Joined: Feb 22, 2010
Posts: 4
I want to compare more than value and display a field using <logic:equal>. Please proveide some examples
<logic:equal name="apcDetailsForm" property="selectedSheetTemplate" value="2"||"3" >

Will this work?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You tell us--*does* it work?

You'd be better off using JSTL's c:if tag; when functionality overlaps with the JSTL you should favor the JSTL. This also gives you a complete EL that will allow you to do more complex calculations.

That said, if the calculation is even remotely complex, I'd consider moving the logic to the Java layer rather than doing in the JSP itself.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: compare more than one value using logic equal in struts
 
Similar Threads
logic:equal compare two values
bean:message tag inside logic:equal
display selective value from VECTOR
logic:equal comparison against int data type
Comparing values in struts using logic:equal..