1 Reply Latest reply: Nov 23, 2010 3:29 AM by EJP RSS

    Can we use logical Operator in C:When  tag of JSTL

    694620
      Hi,

      I am developing an application in JSTL.

      I am using c:when tag. I have question whether can we use Logical OR operator in JSTL.

      I have tried using the following Syntax: The two bean fields have the value DISABLED

      <c:set var="testval" value = "${bean.val}" />
      <c:set var="testvalue" value ="${bean.value}" />

      Ex: <c:when test="${testval eq 'DISABLED'} or ${testvalue eq 'DISABLED'}">

      Ex: <c:when test="${(testval eq 'DISABLED') or (testvalue eq 'DISABLED')}">

      Ex: <c:when test="${testval eq 'DISABLED' or testvalue eq 'DISABLED'}">

      retrieving both these values from bean.

      The following syntaxes did not work.

      Please give me some pointers to resolve the issue.

      Thanks,
      Ravi

      Edited by: user10977303 on Nov 17, 2010 9:05 AM

      Edited by: user10977303 on Nov 17, 2010 9:10 AM