我有一个列表如下
dnsList 有
urls(url1,url2,url3等)及其对应的dns_time,update_time,status_code值。connList 有 urls(url1,url2,url3 等) 和它们对应的 connection_time,update_time 值。
我的servlet将dnsList,connList返回给jsp。现在我试图在jsp中显示它
<table>
<c:forEach items="${dnsList}" begin="0" end="${fn:length(dnsList)}"var="dnsList" varStatus="iter">
<c:forEach items="${connList}" begin="0" end="${fn:length(connList)}"var="connList" varStatus="iter">
here I am displaying the values
<tr>
<td>${dnsList[0]}</td>
<td>${dnsList[1]}</td>
<td>${connList[0]}</td>
<td>${connList[1]}</td>
</tr>
</c:forEach>
</c:forEach>
</table>
我的问题是我重复获得相同的结果 2 次。对于每个 url dnstime,连接时间记录在浏览器中重复多次。请帮助我。如何迭代列表。这样我在表中得到输出
Required output format is
-------------------------------------------------------------
url1
------------------------------------------------------
dns_time connection_time
dns_update_time conn_update_time
status_code
url2
-----------------------------------------
dns_time connection_time
dns_update_time conn_update_time
status_code
请问谁能帮帮我??