提示test不能插入el

pengpeng11 2008-06-14 07:07:12
在使用jstl时,<c:if test="${requestScope.queryAll}"></c:if>时会出现如下异常,提示test中不能包含任何的表达式,
请哪位大哥指点下,怎么样解决!
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /result.jsp(15,4) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
...全文
834 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaoxueluhuan 2010-04-10
  • 打赏
  • 举报
回复
<s:if test="null==requestScope.queryAll||requestScope.queryAll.isEmpty()">
zhj92lxs 2008-06-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 yzsunlight 的回复:]
例如
<c:if test="${requestScope.queryAll==null}"> </c:if>
[/Quote]

就照上面做
yzsunlight 2008-06-14
  • 打赏
  • 举报
回复
<c:if test="${requestScope.queryAll}">
是用来做比较的
yzsunlight 2008-06-14
  • 打赏
  • 举报
回复
例如
<c:if test="${requestScope.queryAll==null}"> </c:if>
yzsunlight 2008-06-14
  • 打赏
  • 举报
回复
<c:if test="${requestScope.queryAll}"> </c:if>

if是用来做判断的啊, 楼主掉了个比较运算符号吧

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧