From: markt
-Please note that JNDI resource configuration has changed somewhat between -Tomcat 5.0.x and Tomcat 5.5.x. You will most likely need to modify your JNDI -resource configurations to match the syntax in the example below in order -to make them work in Tomcat 5.5.x. +Please note that JNDI resource configuration changed somewhat between +Tomcat 5.0.x and Tomcat 5.5.x. You will most likely need to modify older +JNDI resource configurations to match the syntax in the example below in order +to make them work in Tomcat 6.x.x.
@@ -192,15 +192,10 @@ mysql>
-Configure the JNDI DataSource in Tomcat by adding a declaration for your
-resource to $CATALINA_HOME/conf/server.xml.
Add this in between the </Context> tag of the examples
-context and the </Host> tag closing the localhost definition.
-If there is no such tag, you can add one as illustrated in the
-Context and
-Host configuration references, and repeated below
-for your convenience.
+resource to your Context.
For example:
classes12.zip will need to be renamed with a .jar
extension. Since jarfiles are zipfiles, there is no need to unzip and jar these
files - a simple rename will suffice.
Some early versions of Tomcat 4.0 when used with JDK 1.4 will not load
-classes12.zip unless you unzip the file, remove the javax.sql.*
-class heirarchy and rejar.
For Oracle 9i onwards you should use oracle.jdbc.OracleDriver
rather than oracle.jdbc.driver.OracleDriver as Oracle have stated
that oracle.jdbc.driver.OracleDriver is deprecated and support
for this driver class will be discontinued in the next major release.
In a similar manner to the mysql config above, you will need to define your -Datasource in your server.xml file. Here we define a Datasource called myoracle -using the thin driver to connect as user scott, password tiger to the sid -called mysid. (Note: with the thin driver this sid is not the same as the -tnsname). The schema used will be the default schema for the user scott.
+Datasource in your Context. Here we define a +Datasource called myoracle using the thin driver to connect as user scott, +password tiger to the sid called mysid. (Note: with the thin driver this sid is +not the same as the tnsname). The schema used will be the default schema for the +user scott.Use of the OCI driver should simply involve a changing thin to oci in the URL string.
You should ensure that you respect the elemeent ordering defined by the DTD when you +
You should ensure that you respect the element ordering defined by the DTD when you create you applications web.xml file.
-Create a resource definition file for your application defining the
-datasource. This file must have the same name as your application, so if
-your application deploys as someApp.war, this filename must
-be someApp.xml. This file should look something like the following.
+Create a resource definition for your Context.
+The Context element should look something like the following.