【发布时间】:2011-12-09 15:02:39
【问题描述】:
我正在尝试访问在包含中的 JSTL for 循环中设置的一些 JSTL 变量。
例子:
<c:forEach items="${cart.entries}" var="entry">
<jsp:include page="helper.jsp"></jsp:include>
</c:forEach>
在 helper.jsp 中,我希望能够引用变量“entry”。它一直显示为“空”。我想也许有一种方法可以像使用普通设置变量一样为 forEach 变量添加范围。
有什么想法吗?
【问题讨论】:
标签: jsp foreach jstl scope jspinclude