当前位置: 代码迷 >> Java Web开发 >> 用 jstl 做一段跌代 后出现这样的异常! 不知道为什么?
  详细解决方案

用 jstl 做一段跌代 后出现这样的异常! 不知道为什么?

热度:742   发布时间:2016-04-17 01:26:49.0
用 jstl 做一段跌代 后出现这样的错误! 不知道为什么??
就是在list.jsp中 用 jstl 做一段跌代(list)! 后出现这样的错误! 不知道为什么??
//我测试过 后台代码没有问题!! list 有值 

org.apache.jasper.JasperException: /list.jsp(71,6) According to TLD or attribute directive in tag file, attribute test does not accept any expressions

list.jsp 部分代码:

<c:choose>
<c:when test="${empty list2}">
<tr>
<td colspan="9">
没有你要的数据
</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach items="${list}" var="u">
<tr>
<td>&nbsp;&nbsp;</td>
<td>${u.card_id}</td>
<td>${u.name}</td>
<td>${u.sex]}</td>
<td>${u.mobile]}</td>
<td>${u.phone}</td>
<td>${u.email}</td>
<td>${u.address}</td>
<td><a href="">修改</a></td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>

------解决方案--------------------
探讨
楼主 回复:

问题终于解决了 原来 mylist 设置到 session 中 没问题了 但是我不知道为什么设置到request中 在list.jsp中取出来的是null! 辛苦大家!! 想想 为什么设置到session 中 myList就能找到 但是 设置到 request中 就找不到啊 ! 我可是直接就转到 list.jsp中的啊??