lundi 7 décembre 2015

In JSTL I need multiple

I'm asking this really simple question because I can't find a definitive answer.

I have a situation where in some JSTL where I need TWO statements, but I don't need the c:otherwise

<c:choose>
    <c:when test="${price != null}">Some Content</c:when>
    <c:when test="${specialOffer != null}">Some Content</c:when>
    <c:otherwise></c:otherwise>
</c:choose>

basically, I have two conditions that need to be fulfilled, or display nothing. Can I just leave the c:otherwise out? Is that the correct way to do this?

Cheers Darren

Aucun commentaire:

Enregistrer un commentaire