<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<td colspan="1" width="100">
<c:choose>
<c:when>
<c:choose>
<c:when></c:when><c:otherwise>
<c:when test="<%=\"F\".equals(result[1]) %>">
<c:set var="checked"><%=result[0].equals("Y")%></c:set>
<input type="checkbox" id="<%="ABC"+"$"+rows%>" name="<%="ABC"+"$"+rows%>" value="<%=String.valueOf(rows)%>" ${checked ? 'checked' : ''} onclick="someFunction(this)"/>
</c:when></c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</td>
For some reason, the JSP compiler complains that there is no end tag for the <c:when>
that nests the input type="checkbox"...may i know what i'm doing wrong? i tried using <c:if>
and it doesnt work either, compiler complains no end tag too.
EDIT: if i dont nest the input type and the set var like below, then it works...but it fails to accomplish my original logic..
<c:otherwise>
<c:when test="<%=\"F\".equals(result[1]) %>">
</c:when>
<c:set var="checked"><%=result[0].equals("Y")%></c:set>
<input type="checkbox" id="<%="ABC"+"$"+rows%>" name="<%="ABC"+"$"+rows%>" value="<%=String.valueOf(rows)%>" ${checked ? 'checked' : ''} onclick="someFunction(this)"/>
</c:otherwise>
EDIT 2: i have to code jsp in this manner on pain of death from my architect lol. any advice will be gladly accepted to retain my proposed logic.