<table >
<-- 定义一个全局的变量j,并赋初始值为1,下面经过forEach循环后,每循环一次,j都自动加1 -->
<c:set var="j" value="${1}"/>
<c:forEach items="${docFlowSteps}" var="docFlowStep">
<tr>
<c:set var="userId" value="userId${j}"/>
<c:set var="userName" value="userName${j}"/>
<td><input type="hidden" />
</c:forEach>
</table>
看结果图: