Another thing you might look at is your jsp code. You have

DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/testdev");

you probably want

DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/testdev");


notice that there is no / before comp.


James


Eugene Lee wrote:


On Sat, Aug 23, 2003 at 08:59:05AM -0600, James Harman wrote:
: : Eugene,
: : I noticed that in the web.xml you have the jbdc resource in a : resource-ref. In my stuff I have it as a context-param like this
: : <context-param>
: <param-name>
: javax.servlet.jsp.jstl.sql.dataSource
: </param-name>
: <param-value>
: jdbc/testdev
: </param-value>
: </context-param>
: : This comes right after the <web-app> element in the web.xml file. : : I am not experienced enough to know the difference between context-param : and resource-ref, but this seems to work for me.


I'm using <resource-ref> because that's what the Tomcat docs say. :-)

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example

I'll try it out later today and report back with the results.






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



Reply via email to