开发者

How to use list object in <c:forEach tag?

I have two list objects in request. Now I want to use them in jsp page by the following approach:

<c:forEach items="${listA}" var="A">
<tr><td>${A.propA}</td><开发者_StackOverflow社区td>${listB[A.index].propB}</td>
</c:forEach>

Is that possible? Thanks

I got the correct approach:

<c:forEach items="${listA}" var="A" varStatus="status">
<tr><td>${A.propA}</td><td>${listB[status.index].propB}</td>
</c:forEach>


Yes try,

${requestscope.listA}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜