<c:forEach var="c" items="${v.categories}">
<c:if test="${flag}">,</c:if>
${c.name}
<c:set var="flag" value="true" scope="request"/>
</c:forEach>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:choose>
<c:when test="${fn:length(productEntities) > 0}">
<c:forEach var="p" items="${productEntities}" varStatus="idx">
<c:if test="${idx.index == 0}">
${p.productName}
</c:if>
<c:if test="${idx.index != 0}">
,${p.productName}
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
为空
</c:otherwise>
</c:choose>