<c:if>
is not working for comparing characters.The code is inside a table.Here is the code
<c:if test="${record.type eq 'U' }">Planned</c:if>
When I use this code inside the table,the table content is not displayed.Please help!
Issue is EL supports both double and single quoted Strings. So 'U'
is taken as String
, not char
. To resolve the issue, you can use charAt(0)
method on that String:
<c:if test="${record.type eq 'U'.charAt(0) }">Planned</c:if>
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