I have a jsp file which has the following code:
<%
while(rs.next()){ //rs is the resultser
%>
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';">
<td width="3%"><span style="font-size: 8pt"><%=i=i+1%></span></td>
<td width="10%"><span style="font-size: 8pt">
<a href="cir_view.jsp?cir_id=<%=rs.getString("cir_id")%>
and I want to change the while loop to a for loop. I tried this but, I was stuck trying to retrieve the values for the cir_id. Here is my code:
<%
for(int j=1; j<=totalCols; j++) {
%>
<tr bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';">
<td width="3%"><span style="font-size: 8pt"><%=j=j+1%></span></td>
<td width="10%"><span style="font-size: 8pt">
<a href="cir_view.jsp?cir_id=<%=rs.getString("cir_id")%>" >>> Here is the change??
Can you please help to modify it?