Installing database drivers
You need to install the appropriate database driver first. See database drivers for more details on how to get the drivers. This page illustrates how to install the database driver for Tomcat, using MySQL as an example. The procedure is similar for other database management systems.
The database driver is a jar file named, for example, apache-tomcat/lib/mysql-connector-java-5.1.46.jar. This file needs to be copied to the lib directory of your Tomcat installation. All jar files in that directory are picked up by Tomcat automatically.
The Tomcat installation directory looks as follows:
- apache-tomcat
- bin
- conf
- lib
- logs
- webapps
- ...
You need to copy the database driver to the library directory, so that the file apache-tomcat/lib/mysql-connector-java-5.1.46.jar exists. Restart the server and the driver is available and can be selected.