Q: How can I create a JDBC Data Source on Tomcat?
A: Here are the steps for creating a Data Source on Tomcat:
1. In Tomcat's context.xml file (/conf/context.xml),
add a line similar to the following:
2. In Tomcat's server.xml file (/conf/server.xml,
add the following XML snippet to the node:
validationQuery="select * from qauser.employee"
3. In Tomcat's common/lib directory, add the JDBC driver
JARs (for DB2 v8.x or 9.x, these are db2jcc.jar, db2jcc_license_cu.jar,
db2jcc_license_cisuz.jar). If connecting to DB2 v7, use the db2java.jar
You actually only need one of those license JARs. The "cu"
JAR is for windows, the "cisuz" JAR is for UNIX, etc.