Row id’s in html table

I have a jsp that displays a table of xml files and I want do display its content when I click on certain file in a table, but I dont know how to remember which row ID i clicked on so I know which file to display. This code displays table of files.

<table class="zakladni" border="1">
     <thead>
           <tr>
              <th>Name</th>
              <th>Version</th>
          </tr>
     </thead>
     <s:useActionBean beanclass="org.cz.muni.fi.pb138.WARActionBean" var="actionBean"/>
     <c:forEach items="${actionBean.getWARs()}" var="WAR">
          <tr>
              <td><c:out value="${WAR.getFileName()}"/></td>
              <td><c:out value="${WAR.getTimestamp()} "/></td>
          </tr>
     </c:forEach>
</table>


Source: jsp

Leave a Reply