I have a need to perform a bitwise test within a JSP but can't for the life of me figure out how to do it with EL.
I want to do something like:
<c:if test="${(test & testFor) == testFor}">
<h3>Test Passed</h3>
</c:if>
Of course I can do it with ordinary JSP syntax:
<% if ((test & testFor) == testFor) { %>
<h3>Test Passed</h3>
<% } %>
I think bitwise operators are not implemented in JSTL (see here)
You can implement a JSTL function, called bitwiseAnd(int, int)
and perform the bitwise test in Java code
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