jsp标签 c:when

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

在jsp页面用报错Illegal use of <when>-style tag without <choose> as its direct parent
原因是:必须在里面使用。

<c:choose>
<c:when test="${book.compareToday=='0'}">
<h5>预约过期</h5>
</c:when>
<c:otherwise>
取消预约
</c:otherwise>
</c:choose>

原文链接:https://blog.csdn.net/zl544434558/article/details/45892055

 

posted on 2021-11-11 13:39  leaverk  阅读(591)  评论(0)    收藏  举报