This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LogicGreaterThan tag

 
sudhakar Tadepalli
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to use <logic:greaterThan> tag for the following logic.

If (var1 >0 or var2>0) say "Yes" otherwise Say "NO".

How use <logic:greaterThan> tag for the above logic.

Thanks in advance.

Sudhakar
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really recommend JSTL over the logic tags:
<c:choose>
<c:when test='${var1 > 0 || var2 > 0}'>
Yes
</c:when>
<ctherwise>
No
</ctherwise>
</c:choose>
 
Stefan Evans
Bartender
Posts: 1640
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't pretend its nice, but this should accomplish it.
As Marc said, the JSTL tags do this so much better.

 
sudhakar Tadepalli
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the code and advise.

Sudhakar
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic