the page that dnunes have provided does not have jstl example..
but here is how you will put it on your jstl page
<sql:query var="result" dataSource="jdbc/asm_met">
SELECT * FROM yourtable
</sql:query>
<table border="1">
<%-- Output column names on a header row --%>
<tr>
<c:forEach var="columnName" items="${result.columnName
<th><c:out value="${columnName}"/></th>
</c:forEach>
</tr>
<%-- Output each row of data --%>
<c:forEach var="row" items="${result.rowsByInde
<tr>
<%-- Output each column of data --%>
<c:forEach var="col" items="${row}">
<td><c:out value="${col}"/></td>
</c:forEach>
</tr>
</c:forEach>
</table>
Main Topics
Browse All Topics





by: dnunes_brPosted on 2008-12-03 at 18:32:38ID: 23092268
Here is a good tutorial from Apache:
omcat-4.1- doc/jndi-d atasource- examples-h owto.html
http://tomcat.apache.org/t
It's the same logic, but you have already configured the JNDI in your WSAD. Just see the code to use JNDI datasource.