title: Don't understand JspTagException: "Illegal use of <when>-style tag without <choose> as its direct parent
body: <p>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 <code>JspTagException</code>:</p>
  
  <pre><code>"Illegal use of &lt;when&gt;-style tag without &lt;choose&gt; as its direct parent"
  </code></pre>
  
  <p>Are you not allowed to nest condition tags this deeply in JSTL?</p>
  
  <pre><code>&lt;c:choose&gt;
      &lt;c:when test="${rec.image1Available}"&gt;
      &lt;img alt="altname" src="/img1.jpg" alt="altname" /&gt;
      &lt;c:otherwise&gt;
      &lt;c:choose&gt;
          &lt;c:when test="${rec.image2Available}"&gt;
          &lt;img alt="altname" src="/img2.jpg" alt="altname" /&gt;
              &lt;c:otherwise&gt;
              &lt;c:choose&gt;
                  &lt;c:when test="${rec.image3Available}"&gt;
                  &lt;img alt="altname" src="img3.jpg" alt="altname" /&gt;
                      &lt;c:otherwise&gt;
                      &lt;img alt="altname" src="/holder.jpg" alt="altname" /&gt;
                      &lt;/c:otherwise&gt;
                  &lt;/c:when&gt;
              &lt;/c:choose&gt;
              &lt;/c:otherwise&gt;
          &lt;/c:when&gt;
      &lt;/c:choose&gt;
      &lt;/c:otherwise&gt;
      &lt;/c:when&gt;
  &lt;/c:choose&gt;
  </code></pre>