I am new to struts and I was thinking if we can implement OR and AND conditions with struts logic:equal? if not then what are the alternatives.
for AND like if(Column1 == "1" && Column2 == "2") { .... }
you can use :
<logic:equal name="urList" property="Column1" value="1">
<logic:equal name="urList" property="Column2" value="2">
doSomeThing
</logic:equal>
</logic:equal>
or for 'OR' :
<logic:equal name="urList" property="Column1" value="1">
doSomeThing
</logic:equal>
<logic:equal name="urList" property="Column2" value="2">
doSomeThing
</logic:equal>
sry for bad english.
You can use EL with Strut's taglib. You can also use JSTL (c:if in this case).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With