I am just wondering whether the below code is valid?
<c:choose>
<c:when test="${empty example1}">
</c:when>
<c:when test="${empty example2}">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
In a c:choose
,
the first when for which the test is true is the winner.
In the c:choose
below,
if "first test" and "second test" are both true,
then the "Kpow" h2 will be added to the html page and the "Blammy" will not.
<c:choose>
<c:when test="first test">
<h2>Kpow</h2>
</c:when>
<c:when test="second test">
<h2>Blammy</h2>
</c:when>
</c:choose>
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