jstl运用标签不完整错误
javax.servlet.jsp.JspTagException: Illegal use of <when>-style tag without <choose> as its direct parent
套路中任一个环节不可少:
<c:choose><c:when></c:when><otherwise></otherwise></choose> 是一个整体,不可单独运用其中元素。
如下:
<c:choose>
<c:when test="${empty inspectReport}"></c:when>
<c:otherwise>
<%
//如果CustomerId有相同,则合并集团客户、风险等级、集团最远项目到期日。
//如果CustomerId有相同且统计年度相同,则合并应检查次数、已计划检查次数、已完成检查次数、已完成报告次数。
//如果CustomerId不相同但集团客户相同,则合并集团客户。
%>
<c:forEach items="${inspectReport}" var="rep" varStatus="r">
<tr>
<c:forEach items="${rep.listColumns}" var="columns" varStatus="c">
<c:choose>
<c:when test="${'CustomerId'== columns.columnName}">
<td style="display:none;">${columns.columnValue}</td>
</c:when>
<c:otherwise>
<td>${columns.columnValue}</td>
</c:otherwise>
</c:choose>
</c:forEach>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
我有两个梦想,一是娶一美丽贤惠的姑娘,二是有一稳定踏实的工作。