`
riching
  • 浏览: 261663 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JSTL判断集合的长度

阅读更多
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>

显示一个集合的长度 ${fn:length(rowList)}
判断一个集合的长度后显示集合的内容
<c:if test="${fn:length(rowList)>2}">${rowList[2]}</c:if>


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics