首页 > 学院 > 开发设计 > 正文

el表达式便利map集合

2019-11-14 23:25:39
字体:
来源:转载
供稿:网友
el表达式便利map集合

<c:forEach items="${b.goodMap}" var="entry" varStatus="status">          ${entry.key}(${fn:length(entry.value)})${status.last?"":",  "} </c:forEach>

方式2:

<c:forEach items="${b.goodMap}" var="entry" varStatus="status"> ${entry.key}(${fn:length(entry.value)}) <c:choose>     <c:when test="${status.last}">     </c:when>     <c:otherwise>         ,&nbsp;     </c:otherwise> </c:choose> </c:forEach>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表