tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: JSTL forEach acting funny
Date Thu, 02 Dec 2004 13:19:52 GMT
ensure

<web-app 
	version="2.4" 
	xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

in your web.xml as the previous poster suggests.

> -----Original Message-----
> From: sbeam [mailto:sbeam@onsetcorps.net]
> Sent: 02 December 2004 13:14
> To: Tomcat Users List
> Subject: Re: JSTL forEach acting funny
> 
> 
> 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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message