I've been staring at the tag nesting below for about an hour now and I still can't figure out why I keep getting a JspTagException
:
"Illegal use of <when>-style tag without <choose> as its direct parent"
Are you not allowed to nest condition tags this deeply in JSTL?
<c:choose>
<c:when test="${rec.image1Available}">
<img alt="altname" src="/img1.jpg" alt="altname" />
<c:otherwise>
<c:choose>
<c:when test="${rec.image2Available}">
<img alt="altname" src="/img2.jpg" alt="altname" />
<c:otherwise>
<c:choose>
<c:when test="${rec.image3Available}">
<img alt="altname" src="img3.jpg" alt="altname" />
<c:otherwise>
<img alt="altname" src="/holder.jpg" alt="altname" />
</c:otherwise>
</c:when>
</c:choose>
</c:otherwise>
</c:when>
</c:choose>
</c:otherwise>
</c:when>
</c:choose>