Java Tutorial - Java Scipt : Installing the JDBC Drivers

Java Tutorial - Java Scipt :

Installing the JDBC Drivers


With the DBCP support installed, we are now ready to add the database drivers. We want to add two drivers, one for HSqlDb and the other for MySQL. The HSqlDb driver is built into the hsqldb.jar file. There is no need to extract it; we will use the entire .jar file. Copy the entire file into the CATALINA_HOME/common/lib subdirectory. Placing the driver here allows access both by Tomcat and by all Web applications. The driver needed for MySQL is the mysql-connector-java-version-bin.jar file. This should also be copied into the common/lib directory of the Tomcat installation. Once again, if you are using Linux, change the owner and set the permissions to match the rest of the installation.
When this is done, stop and restart Tomcat again.