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>

原文地址:https://www.cnblogs.com/qq-757617012/p/4359245.html