On Thursday 02 December 2004 08:07 am, Allistair Crossley wrote:
> you need
> 
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> 
> at the top of your jsp though.

Have that - if I didn't then <c:forEach ...> would show up in the 
output, but it doesn't. 

My apologies, I should have mentioned I was doing the "mySQL DBCP 
Example" specifically. Anyway, here is the whole jsp:

=================================
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

<sql:query var="rs" dataSource="jdbc/TestDB">
select id, foo, bar from testdata
</sql:query>

<html>
  <head>
    <title>DB Test</title>
  </head>
  <body>

  <h2>Results</h2>
  
<c:forEach var="row" items="${rs.rows}">
    Foo ${row.foo}<br/>
    Bar ${row.bar}<br/>
</c:forEach>

  </body>
</html>
=================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to