The jndi resource howto page link I posted should have mentioned the
.jar file get's placed in tomcat's common/lib.
--David
sam wun wrote:
Hi,
I couldn't find an installation document about installing the driver.
I;ve downloaded the driver:
linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls
mysql-connector-java-5.1.3-rc-bin.jar
mysql-connector-java-5.1.3-rc-bin.jar
Do you know how to configure tomcat to make use of it?
Thanks
Sam
----- Original Message -----
From: Pid
Sent: 28/08/08 06:47 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project
sam wun wrote:
Do I need to put mysql driver in the common/lib/ directory in linux?
Yes, that's a basic requirement.
If I need to have that, where can I download it?
The MySQL site - you could probably have guessed that.
http://dev.mysql.com/usingmysql/java/
Thanks
----- Original Message -----
From: sam wun
Sent: 28/08/08 04:44 pm
To: Tomcat Users List
Subject: Re: Re: Can't execute servlet project
HI there,
According to the tomcat online document, do I have to modify the
context.xml file?
$CATALINA_HOME/conf/context.xml
with the following new setup: <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?autoReconnect=true"/>
where username/password is the root/admin user/password of the mysql
database?
thanks
----- Original Message -----
From: David Smith
Sent: 28/08/08 03:06 am
To: Tomcat Users List
Subject: Re: Can't execute servlet project
The datasource for your webapp isn't setup correctly. Take a look at
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
for help on how to properly setup a database connection pool. My
only
edit that article I would recommend is don't add ?autoReconnect=true
to
the end of the mysql database url. Instead, add
validationQuery="select
1" to the <Resource ... /> element in your context.xml file so
connections are tested and regenerated as needed.
--David
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]