是这样吗?
<c:if test="${theBooleanVariable == false}">It's false!</c:if>
或者我可以这么做吗?
<c:if test="${!theBooleanVariable}">It's false!</c:if>
Both works. Instead of == you can write eq
==
eq
You can have a look at the EL (expression language) description here.
Both your code are correct, but I prefer the second one, as comparing a boolean to true or false is redundant.
true
false
For better readibility, you can also use the not operator:
not
<c:if test="${not theBooleanVariable}">It's false!</c:if>
You can check this way too
<c:if test="${theBooleanVariable ne true}">It's false!</c:if>