Question

I would like to write this scriptless ?

<tr>
<% for (int column = 0; column < DataSource.getAttributeCount(); column++) { %>

<td><%=row.getAttribute(column)%></td>
<%
}
%>
</tr>

No correct solution

OTHER TIPS

  1. First you should include the tag to your jsp page as below:

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
  2. After that you can use the forEach tag to iterate the query list,below is the code that may be helpful to you:

    <tr>
       <c:forEach items="${DataSource.attribute}" varStatus="status">
        <td>${row.getAttribute(status.index)}</td>
       </c:forEach>
    </tr>
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top