Mysql drivers can be downloaded from http://www.mysql.com/downloads/api-jdbc-stable.html but please check the MySql page for hints and tips first!
See the above link for download details and a note about using the com.mysql not the org.gjt jdbc class libary.
I put the driver here: /usr/local/jakarta-tomcat/common/lib
The file being mysql-connector-java-3.0.9-stable, with a soft link to it from "mysql.jar"
In the jakarta-tomcat/conf/server.xml, you'll need to define a ResourceParams entry with the parameter thus (snippet): {{{ <parameter>
<name>driverClassName</name> <value>com.mysql.jdbc.Driver</value>
</parameter> }}}
and then in the WEB-INF/web.xml for your webapp, you'll also need an entry thus: {{{ <resource-ref>
<description>My DB Connection</description> <res-ref-name>jdbc/MyDbResource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth>Jetspeed
</resource-ref> }}}
here's a working snippet from ~/webapps/jetspeed/WEB-INF/confTorque.properties file: {{{ torque.dsfactory.ourdb.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
- torque.dsfactory.ourdb.pool.defaultMaxConnections=10 torque.dsfactory.ourdb.pool.maxExpiryTime=3600 torque.dsfactory.ourdb.pool.connectionWaitTimeout=10 torque.dsfactory.ourdb.connection.driver = com.mysql.jdbc.Driver torque.dsfactory.globaldb.connection.url = jdbc:mysql://mydb.example.com:3306/support torque.dsfactory.ourdb.connection.user = username torque.dsfactory.ourdb.connection.password = password
- }}}