昨天在开发中遇到一个问题 用el 表达式判读
<c: if test="">的用法.
服务跑起来报页面错误.
<select name="errType" id="errType" style="width: 155px;">
<option value="">请选择</option>
<option value="1" <c:if test=${rn.errType==1}> selected </c:if>>一般性错误</option>
<option value="2" <c:if test=${rn.errType==2}> selected </c:if>>计算错误</option>
<option value="3" <c:if test=${rn.errType==3}> selected </c:if>>专业不严谨</option>
<option value="4" <c:if test=${rn.errType==4}> selected </c:if>>专业错误</option>
<option value="5" <c:if test=${rn.errType==5}> selected </c:if>>课件制作错误</option>
</select>
看红色部分,答案马上揭晓.
原来,test中 没有加 "" 所以页面报错了.