Assuming that's an 'and condition and that A, B and C are also variables,
<c:choose>
<c:when test = ${X ne A && X ne B && X ne C}>
//do something
</c:when>
<c:otherwise>
//do some other thing
</c:otherwise>
</c:choose>
If A, B and C are String constants, then the above would change to
<c:when test = ${X ne 'A' && X ne 'B'&& X ne 'C'}>
And finally if that isnt an 'and' operation
<c:choose>
<c:when test = ${X ne A}>
//do something
</c:when>
<c:when test = ${X ne B}>
//do some other thing
</c:when>
<c:when test = ${X ne C}>
//do yet another thing
</c:when>
</c:otherwise>
//process
</c:otherwise>
</c:choose>
ram.
Thanks but my code must be xml valid, so i must use the encode versions of & and <> which is &&and <>
I trid this but it still give an error:
fnbQ is a variable, and a b and c are strings
<c:choose>
<c:when test="${finQ <> 'A' && finQ <> 'B' && finQ <> 'C' && finQ <> 'D'}">
......
</c:when>
</c:choose>
You can use words instead of symbols for operations:
&& = and
|| = or
<> = ne
That would avoid all the nastiness with escaping right?
<c:when test="${finQ ne 'A' and finQ ne 'B' and finQ ne 'C' and finQ ne 'D'}">