Yes,
In the context.xml I have <ResourceParams name="jdbc/CurrencyDB">
Also in web.xml I have
<resource-ref>
<res-ref-name>jdbc/CurrencyDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Thanks,
Kevin
----- Original Message -----
From: "Alan Chaney" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, February 24, 2008 9:11 AM
Subject: Re: Help getting MySQL connected to Tomcat
[EMAIL PROTECTED] wrote:
Thanks for the help. I still don't have this working completely, but
tomcat is now working.
I tested mysql and it is using tcp/ip. "mysql -h 127.0.0.1 -u
javauser -p" works fine.
Also the MSQLAdmin program shows it is connecting to the correct port
3306
Context init = new InitialContext();
Context ctx = (Context) init.lookup("java:comp/env");
DataSource ds = (DataSource) ctx.lookup("jdbc/CurrencyDB");
In the previous posts, you have used jdbc/TestDB in your resource
defintion. I presume you have changed id?
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="javauser" password="javadude"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest"/>
</Context>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]