Richard, I believe the first two elements appearing in your web.xml (Resource and ResourceParams) need to be present in the server configuration:
1. either as a global resource in your server.xml (inside the Server element) 2. or as a context specific resource in a "context descriptor" - a Context entry in your server.xml, or (the new way) an external xml file (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html) This way Tomcat knows about and sets up the resource for you web application to use; I think the only thing you should do in your web.xml is "declare a need" for a resource, though this part I'm hazy on, as my stuff has always worked without any mention of the container-managed resource in my web.xml's. If anyone can clarify the requirement/logic behind declaring resource "needs" in web.xml, I'd appreciate it. -Sasha From: "Richard Calosso" <[EMAIL PROTECTED]> Reply-To: Tomcat Users List <[EMAIL PROTECTED]> Date: Mon, 10 May 2004 14:12:02 -0700 To: "Tomcat Users List (E-mail)" <[EMAIL PROTECTED]> Subject: JDBC Source getting null url I just started to try and use a database source for some of my pages in my web app and am not getting a connection. I am using Tomcat 5.0.19 with JRE 1.4.2_04 on redhat 9 with mysql. Every time I try to connect I get a exception saying Datasource invalid, not suitable driver for class '' url null (actual error page attached). I am trying the examples in the docs, I get the same error in either servlet or jsp page, I have included the jsp page. I have everything packaged in the web.xml file of the application to try and keep it portable. I also tried using the admin tool and register a global data source and get the same result. If I mistype the datasource name in the jsp it says it cannot find it so I does find some of it to verify, but why does it not find the resource parameters providing the driver and url? I tried to google for some answers, but did not find much that applied to the same versions. Thanks in advance. =========== Attached are my web.xml, sqltest.jsp, and the error output --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
