문제

I would like to write this scriptless ?

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

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

올바른 솔루션이 없습니다

다른 팁

  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>
    
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top