wood burning stoves 2.0*
The moose likes Struts and the fly likes LogicGreaterThan  tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "LogicGreaterThan  tag " Watch "LogicGreaterThan  tag " New topic
Author

LogicGreaterThan tag

sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
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

Joined: Feb 05, 2003
Posts: 4727

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>


A good workman is known by his tools.
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
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

Joined: Dec 27, 2001
Posts: 130
Thanks for the code and advise.

Sudhakar
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: LogicGreaterThan tag