Java JDNI Database Access
April 12, 2010
Here's the Java code and config required to set up a database connection in tomcat, and then refer to it from a WAR file.
Java Code
This code lives inside the WAR file. It looks at Tomcat's config to work out which database to connect to, connects, and then returns …