jstl foreach省略最后一条记录中的元素 [英] jstl foreach omit an element in last record
本文介绍了jstl foreach省略最后一条记录中的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试使用此jstl来表示json字符串,我如何使该段不在最后一个记录的末尾添加逗号?最后注意逗号
trying to use this jstl to formulate a json string, how can i make the segment not to put a comma in the end of the last record? note the comma in the end
<c:forEach items="${fileList}" var="current">
{ id:1001,data:["<c:out value="${current.fileName}" />" , "<c:out value="${current.path}" />" , "<c:out value="${current.size}" />" , "<c:out value="${current.type}" />"] },
</c:forEach>
推荐答案
查看全文