August 2002
Intermediate to advanced
688 pages
23h
English
<c:choose>
The <c:choose>
action controls the processing of
nested
<c:when> and
<c:otherwise> actions. It allows only the
first <c:when> action with a test expression
that evaluates to true to be processed; it gives
the go-ahead to the single <c:otherwise>
action if none do.
<c:choose>
<c:when> actions and optionally one <c:otherwise> action
</c:choose>None
<c:choose>
<c:when test="${product.onSale}">
<c:out value="${product.salesPrice}" /> On sale!
</c:when>
<c:otherwise>
<c:out value="${product.price}" />
</c:otherwise>
</c:choose>Read now
Unlock full access