转自:https://blog.csdn.net/buster2014/article/details/45789647

JSTL获取list的大小,jstl获取list 的长度,EL表达式获取list的长度,EL表达式获取list大小


在jsp页面中不能通过${list.size}取列表长度,而是
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:out value="${fn:length(list)}"></c:out>

不足10行补空行
<c:forEach begin= "${fn:length(list)}" end = "${10 - fn:length(list)}">
<tr><td></td></tr>
</c:forEach>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-06-17
  • 2023-03-20
  • 2022-01-24
相关资源
相似解决方案