【发布时间】:2015-05-28 09:14:38
【问题描述】:
我使用这个 jsp、servlet 和 struts。 (Jsp 版本 2.0,servlet 2.4,struts 1)。 另一个循环中有一个“for”循环。
...
<%
String[] profileNames = { "Page", "Report", "XML API" };
for (String profileName : profileNames) {
LRUCache profile = ObjectStore.getStore(profileName + " Profile");
pageContext.setAttribute("profile", profile);
pageContext.setAttribute("profileName", profileName);
%>
<table class="sortable" id="<%=profileName%>">
<tr class=title>
<th class=contentTable>description</th>
<th class=contentTable>qty</th>
</tr>
<c:forEach var="profile" items="${profileItems}">
<tr>
<td>${profile.object.description}</td>
<td>${profile.object.qty}</td>
</tr>
</c:forEach>
</table>
<%
}
%>
我需要这个没有 java 代码的 jsp 页面。如何实施?
感谢您的帮助!
【问题讨论】: