Illegal use of <when>-style tag without <choose> as its direct parent

报错信息:

javax.servlet.jsp.JspTagException: Illegal use of &lt;when&gt;-style tag without &lt;choose&gt; as its direct parent


<c:choose>
    <c:when test=”${people.age<18 }”>
        <h2>小于18</h2>
    </c:when>
    <c:when test=”${people.age=18 }”>
        <h2>等于18</h2>
    </c:when>
    <c:otherwise>
        <h2>大于18</h2>
    </c:otherwise>
</c:choose>

少了<c:chosse>标签





版权声明:本文为DouBoomFly原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。