From: markt Date: Sun, 15 Jul 2007 20:58:12 +0000 (+0000) Subject: Remove references to adding stuff to server.xml and cross-reference the context docs... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5a6f018f7a6defad721f98fbf674b7fa1c6e596a;p=tomcat7.0 Remove references to adding stuff to server.xml and cross-reference the context docs instead. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@556453 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/jndi-datasource-examples-howto.xml b/webapps/docs/jndi-datasource-examples-howto.xml index 8749dc6be..bb548f8c7 100644 --- a/webapps/docs/jndi-datasource-examples-howto.xml +++ b/webapps/docs/jndi-datasource-examples-howto.xml @@ -42,10 +42,10 @@ know if you have any other tested configurations that you feel may be of use to the wider audience, or if you feel we can improve this section in anyway.

-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>

-

2. server.xml configuration

+

2. Context configuration

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: <Context path="/DBTest" docBase="DBTest" @@ -316,22 +311,19 @@ or 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.

-

1. server.xml configuration

+

1. Context configuration

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. @@ -344,7 +336,7 @@ tnsname). The schema used will be the default schema for the user scott.

2. web.xml configuration

-

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.

<resource-ref> @@ -409,10 +401,8 @@ Tomcat installation.

-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.