Return-Path:
Delivered-To: apmail-tomcat-dev-archive@www.apache.org
Received: (qmail 47500 invoked from network); 20 Jul 2007 22:32:06 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2)
by minotaur.apache.org with SMTP; 20 Jul 2007 22:32:05 -0000
Received: (qmail 10552 invoked by uid 500); 20 Jul 2007 22:32:03 -0000
Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org
Received: (qmail 10494 invoked by uid 500); 20 Jul 2007 22:32:03 -0000
Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: "Tomcat Developers List"
Delivered-To: mailing list dev@tomcat.apache.org
Received: (qmail 10483 invoked by uid 500); 20 Jul 2007 22:32:03 -0000
Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org
Received: (qmail 10480 invoked by uid 99); 20 Jul 2007 22:32:03 -0000
Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 15:32:03 -0700
X-ASF-Spam-Status: No, hits=-99.5 required=10.0
tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 15:32:00 -0700
Received: by eris.apache.org (Postfix, from userid 65534)
id 3B4A81A981A; Fri, 20 Jul 2007 15:31:40 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r558181 - in /tomcat/trunk:
java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/jndi-datasource-examples-howto.xml
webapps/docs/manager-howto.xml
Date: Fri, 20 Jul 2007 22:31:40 -0000
To: tomcat-dev@jakarta.apache.org
From: fhanik@apache.org
X-Mailer: svnmailer-1.1.0
Message-Id: <20070720223140.3B4A81A981A@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: fhanik
Date: Fri Jul 20 15:31:38 2007
New Revision: 558181
URL: http://svn.apache.org/viewvc?view=rev&rev=558181
Log:
up sync from 6.0
http://svn.apache.org/viewvc?view=rev&rev=556453
http://svn.apache.org/viewvc?view=rev&rev=556489
http://svn.apache.org/viewvc?view=rev&rev=556767
Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml
tomcat/trunk/webapps/docs/manager-howto.xml
Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?view=diff&rev=558181&r1=558180&r2=558181
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri Jul 20 15:31:38 2007
@@ -881,12 +881,12 @@
file = new File(docBase);
String origDocBase = docBase;
+ String contextPath = context.getPath();
+ if (contextPath.equals("")) {
+ contextPath = "ROOT";
+ }
if (docBase.toLowerCase().endsWith(".war") && !file.isDirectory() && unpackWARs) {
URL war = new URL("jar:" + (new File(docBase)).toURL() + "!/");
- String contextPath = context.getPath();
- if (contextPath.equals("")) {
- contextPath = "ROOT";
- }
docBase = ExpandWar.expand(host, war, contextPath);
file = new File(docBase);
docBase = file.getCanonicalPath();
@@ -900,7 +900,7 @@
if (warFile.exists()) {
if (unpackWARs) {
URL war = new URL("jar:" + warFile.toURL() + "!/");
- docBase = ExpandWar.expand(host, war, context.getPath());
+ docBase = ExpandWar.expand(host, war, contextPath);
file = new File(docBase);
docBase = file.getCanonicalPath();
} else {
Modified: tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml?view=diff&rev=558181&r1=558180&r2=558181
==============================================================================
--- tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml Fri Jul 20 15:31:38 2007
@@ -42,10 +42,10 @@
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 @@
-
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:
-
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.
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.