title: No End Tag in JSP taglibs
body: <pre><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%&gt;
  &lt;td colspan="1" width="100"&gt;
  &lt;c:choose&gt;
    &lt;c:when&gt;
      &lt;c:choose&gt;
         &lt;c:when&gt;&lt;/c:when&gt;&lt;c:otherwise&gt;
      &lt;c:when test="&lt;%=\"F\".equals(result[1]) %&gt;"&gt;
       &lt;c:set var="checked"&gt;&lt;%=result[0].equals("Y")%&gt;&lt;/c:set&gt;
       &lt;input type="checkbox" id="&lt;%="ABC"+"$"+rows%&gt;" name="&lt;%="ABC"+"$"+rows%&gt;" value="&lt;%=String.valueOf(rows)%&gt;" ${checked ? 'checked' : ''} onclick="someFunction(this)"/&gt;
      &lt;/c:when&gt;&lt;/c:otherwise&gt;
      &lt;/c:choose&gt;
    &lt;/c:when&gt;    
    &lt;c:otherwise&gt;
    &lt;/c:otherwise&gt;
  &lt;/c:choose&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>For some reason, the JSP compiler complains that there is no end tag for the <code>&lt;c:when&gt;</code> that nests the input type="checkbox"...may i know what i'm doing wrong? i tried using <code>&lt;c:if&gt;</code> and it doesnt work either, compiler complains no end tag too. </p>
  
  <p>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..</p>
  
  <pre><code>    &lt;c:otherwise&gt;
              &lt;c:when test="&lt;%=\"F\".equals(result[1]) %&gt;"&gt;
              &lt;/c:when&gt;
              &lt;c:set var="checked"&gt;&lt;%=result[0].equals("Y")%&gt;&lt;/c:set&gt;
               &lt;input type="checkbox" id="&lt;%="ABC"+"$"+rows%&gt;" name="&lt;%="ABC"+"$"+rows%&gt;" value="&lt;%=String.valueOf(rows)%&gt;" ${checked ? 'checked' : ''} onclick="someFunction(this)"/&gt;
      &lt;/c:otherwise&gt;
  </code></pre>
  
  <p>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.</p>