jsp报错问题之“使用jstl的c标签choose报错Illegal text inside "c:choose" tag问题”
一.报错
[bessky_it][ERROR][2022-03-25 17:19:07] | PLATFORM | ):[c]鍜孾/com.bessky.pss.portal/purchase/sample_apply_add.jsp]鐨凾agLibraryValidator鐨勯獙璇侀敊璇秷鎭�66: Illegal text inside "c:choose" tag: " | URL=sample/applys/create | com.bessky.platform.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:117)
二.问题代码
<c:choose>
<!--获取登录人部门 = 209或 获取登录人部门 = 245-->
<c:when test="${sessionScope.authenticated_user.department.departmentId == 209 ||sessionScope.authenticated_user.department.departmentId == 245}">
<app:select required="required" classes="input-medium" items="${domain.applyUsers }" listkey="userId" listvalue="display" headkey="1" headvalue="王子威" name="sampleApply.purchaseBy" select2="true"></app:select>
</c:when>
<c:otherwise>
<app:select required="required" classes="input-medium" items="${domain.applyUsers }" listkey="userId" listvalue="display" headkey="" headvalue="" name="sampleApply.purchaseBy" select2="true"></app:select>
</c:otherwise>
</c:choose>
三.原因
因为注释问题:<!--获取登录人部门 = 209或 获取登录人部门 = 245-->导致的报错
去掉注释就好了(并非所有人有效)
* 博客文章部分截图及内容来自于学习的书本及相应培训课程,仅做学习讨论之用,不做商业用途。
* 如有侵权,马上联系我,我立马删除对应链接。
* 备注:王子威
* 我的网易邮箱:wzw_1314_520@163.com