【发布时间】:2012-02-17 10:20:34
【问题描述】:
我的表格是使用 jsp scriptlet 填充的。 显示不是问题,但是当我提交将在数据库上进行添加时。 我希望我的表重新加载表上的新结果,但我认为因为我使用的是 jsp scriptlet 我可能需要重新加载整个页面,但我不想这样做,有没有办法可以 用新结果刷新/重新加载我的表?
<%
List<Person> list = Function.doQueryFromDB();
for(Person person : list)
{ %>
<TR>
<TH ><%=person.getName()%><B></B></FONT>
</TR>
<%
}
%>
</table>
<%
List<Person> list = Function.doQueryFromDB();
pageContext.setAttribute("person", list);
%>
<table id="sampTable">
<c:forEach var="per" items="${person}">
<tr>
<td><c:out value="${per.name}" /></td>
</tr>
</c:forEach>
</table>
【问题讨论】:
标签: jsp html-table jstl reload scriptlet