tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williams, Mark L CIV NSWC-PC" <>
Date Fri, 20 Aug 2004 19:29:42 GMT

I've run through the instructions at
-howto.html for MySQL and have thrashed through the process to the point
that I'm convinced that I have a database connection (I can get lots of
errors from MySQL itself and I've put a sql:update command in that
inserted a row in the test database). I've hunted all over and adapted a
little test program for Oracle and have searched the TOMCAT archives.
Sure, I may have missed something, but if I use the test program to
query the database, the variable values aren't returned. For example,
using this exact code from the site above:

	<%@ taglib uri="" prefix="sql"
	<%@ taglib uri="" prefix="c" %>

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

	    <title>DB Test</title>

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


gives me:


Foo ${}
Bar ${}

Verbatim. And that's with two rows in the database now. Again, if I
change the function to a sql:update and poke values into the database,
they go in ok. The TOMCAT administrator shows the appropriate data
source for the database. The Oracle example attempts to get the column
names from a query and use those to label a "SELECT *" kind of

Any suggestions on what to try next (other than give up and go to
regular servlets) would be greatly appreciated.

Mark L. Williams
Computer Scientist
Naval Surface Warfare Center Panama City

View raw message