How to get currently selected row from a resultset?

35 views Asked by At

Please help me to get the currently selected row from this list. I tried to get it by sessions but it didnt work.

<% int icount=0;

while(rs.next())
{ 

    String repairId = rs.getString("item.id");
    String esn = rs.getString("esn");
    String type = rs.getString("type");

    session.setAttribute("repId", repairId);
    session.setAttribute("repEsn", esn);
    session.setAttribute("repType", type);

    %>
    <tr>
        <td><div align="center"><%=++icount%></div></td>


        <td><%=rs.getString("esn")%></td>
        <td><%=rs.getString("type")%></td>
        <td><%=rs.getString("technician")%></td>
        <td><%=rs.getDate("date")%></td>


        <td><div align="center">
                <a href="LoadRepairEqipmentsServlet?repId=<%=repairId%>"
                    onclick="return edit()">Done Repair</a>
            </div></td>

    </tr>
<% } %>
0

There are 0 answers