Return-Path:
Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org
Received: (qmail 88752 invoked from network); 2 Mar 2002 18:00:26 -0000
Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131)
by daedalus.apache.org with SMTP; 2 Mar 2002 18:00:26 -0000
Received: (qmail 619 invoked by uid 97); 2 Mar 2002 18:00:18 -0000
Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org
Received: (qmail 563 invoked by uid 97); 2 Mar 2002 18:00:17 -0000
Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe:
List-Subscribe:
List-Help:
List-Post:
List-Id: "Tomcat Developers List"
Reply-To: "Tomcat Developers List"
Delivered-To: mailing list tomcat-dev@jakarta.apache.org
Received: (qmail 551 invoked by uid 97); 2 Mar 2002 18:00:16 -0000
Date: 2 Mar 2002 18:00:13 -0000
Message-ID: <20020302180013.52847.qmail@icarus.apache.org>
From: glenn@apache.org
To: jakarta-tomcat-4.0-cvs@apache.org
Subject: cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.0.4-B1.txt
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
glenn 02/03/02 10:00:13
Modified: webapps/tomcat-docs/config Tag: tomcat_40_branch host.xml
catalina/src/share/org/apache/catalina/core Tag:
tomcat_40_branch StandardContext.java
StandardHost.java
. Tag: tomcat_40_branch RELEASE-NOTES-4.0.4-B1.txt
Log:
Port the SRV.3.7.1 compliance bug fix into the release branch.
This fixes a spec compliance bug, SRV.3.7.1 states that the
tempdir for a Servlet Context must be unique.
Added the Engine name as a directory path component when creating
the default work directory for a web application. This fixes a bug
where the same work directory would be used for the http and https version
of a virtual host.
Added the workDir attribute to the Host configuration. This makes it
easier to set the base directory where the work directories for
applications are placed when virtual hosting sites with Tomcat.
Revision Changes Path
No revision
No revision
1.2.2.4 +12 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml
Index: host.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -r1.2.2.3 -r1.2.2.4
--- host.xml 12 Oct 2001 17:10:52 -0000 1.2.2.3
+++ host.xml 2 Mar 2002 18:00:12 -0000 1.2.2.4
@@ -114,6 +114,18 @@
false
to run the application directly from a WAR file.
+
+ Pathname to a scratch directory to be used by applications for
+ this Host. Each application will have its own sub directory with
+ temporary read-write use. Configuring a Context workDir will override
+ use of the Host workDir configuration. This directory will be made
+ visible to servlets in the web application by a servlet context
+ attribute (of type java.io.File
) named
+ javax.servlet.context.tempdir
as described in the
+ Servlet Specification. If not specified, a suitable directory
+ underneath $CATALINA_HOME/work
will be provided.
+
+
No revision
No revision
1.78.2.14 +31 -13 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
Index: StandardContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
retrieving revision 1.78.2.13
retrieving revision 1.78.2.14
diff -u -r1.78.2.13 -r1.78.2.14
--- StandardContext.java 27 Feb 2002 02:56:18 -0000 1.78.2.13
+++ StandardContext.java 2 Mar 2002 18:00:12 -0000 1.78.2.14
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.78.2.13 2002/02/27 02:56:18 remm Exp $
- * $Revision: 1.78.2.13 $
- * $Date: 2002/02/27 02:56:18 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.78.2.14 2002/03/02 18:00:12 glenn Exp $
+ * $Revision: 1.78.2.14 $
+ * $Date: 2002/03/02 18:00:12 $
*
* ====================================================================
*
@@ -143,7 +143,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.78.2.13 $ $Date: 2002/02/27 02:56:18 $
+ * @version $Revision: 1.78.2.14 $ $Date: 2002/03/02 18:00:12 $
*/
public class StandardContext
@@ -3917,16 +3917,30 @@
*/
private void postWorkDirectory() {
- // Retrieve our parent (normally a host) name
- String parentName = null;
- if (getParent() != null)
- parentName = getParent().getName();
- if ((parentName == null) || (parentName.length() < 1))
- parentName = "_";
-
// Acquire (or calculate) the work directory path
String workDir = getWorkDir();
if (workDir == null) {
+
+ // Retrieve our parent (normally a host) name
+ String hostName = null;
+ String engineName = null;
+ String hostWorkDir = null;
+ Container parentHost = getParent();
+ if (parentHost != null) {
+ hostName = parentHost.getName();
+ if (parentHost instanceof StandardHost) {
+ hostWorkDir = ((StandardHost)parentHost).getWorkDir();
+ }
+ Container parentEngine = parentHost.getParent();
+ if (parentEngine != null) {
+ engineName = parentEngine.getName();
+ }
+ }
+ if ((hostName == null) || (hostName.length() < 1))
+ hostName = "_";
+ if ((engineName == null) || (engineName.length() < 1))
+ engineName = "_";
+
String temp = getPath();
if (temp.startsWith("/"))
temp = temp.substring(1);
@@ -3934,8 +3948,12 @@
temp = temp.replace('\\', '_');
if (temp.length() < 1)
temp = "_";
- workDir = "work" + File.separator + parentName +
- File.separator + temp;
+ if (hostWorkDir != null ) {
+ workDir = hostWorkDir + File.separator + temp;
+ } else {
+ workDir = "work" + File.separator + engineName +
+ File.separator + hostName + File.separator + temp;
+ }
setWorkDir(workDir);
}
1.18.2.4 +28 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java
Index: StandardHost.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
retrieving revision 1.18.2.3
retrieving revision 1.18.2.4
diff -u -r1.18.2.3 -r1.18.2.4
--- StandardHost.java 27 Jan 2002 21:13:15 -0000 1.18.2.3
+++ StandardHost.java 2 Mar 2002 18:00:12 -0000 1.18.2.4
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v 1.18.2.3 2002/01/27 21:13:15 remm Exp $
- * $Revision: 1.18.2.3 $
- * $Date: 2002/01/27 21:13:15 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v 1.18.2.4 2002/03/02 18:00:12 glenn Exp $
+ * $Revision: 1.18.2.4 $
+ * $Date: 2002/03/02 18:00:12 $
*
* ====================================================================
*
@@ -103,7 +103,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.18.2.3 $ $Date: 2002/01/27 21:13:15 $
+ * @version $Revision: 1.18.2.4 $ $Date: 2002/03/02 18:00:12 $
*/
public class StandardHost
@@ -185,6 +185,12 @@
/**
+ * Work Directory base for applications.
+ */
+ private String workDir = null;
+
+
+ /**
* DefaultContext config
*/
private DefaultContext defaultContext;
@@ -393,6 +399,24 @@
this.unpackWARs = unpackWARs;
+ }
+
+
+ /**
+ * Host work directory base.
+ */
+ public String getWorkDir() {
+
+ return (workDir);
+ }
+
+
+ /**
+ * Host work directory base.
+ */
+ public void setWorkDir(String workDir) {
+
+ this.workDir = workDir;
}
No revision
No revision
1.1.2.2 +13 -1 jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.4-B1.txt
Index: RELEASE-NOTES-4.0.4-B1.txt
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.4-B1.txt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- RELEASE-NOTES-4.0.4-B1.txt 2 Mar 2002 04:20:13 -0000 1.1.2.1
+++ RELEASE-NOTES-4.0.4-B1.txt 2 Mar 2002 18:00:13 -0000 1.1.2.2
@@ -3,7 +3,7 @@
Release Notes
=============
-$Id: RELEASE-NOTES-4.0.4-B1.txt,v 1.1.2.1 2002/03/02 04:20:13 remm Exp $
+$Id: RELEASE-NOTES-4.0.4-B1.txt,v 1.1.2.2 2002/03/02 18:00:13 glenn Exp $
============
@@ -46,6 +46,9 @@
BaseDirContext: Add lifecycle management, to allow releasing used resources.
+StandardHost: Added the workDir attribute to the Host configuration.
+ This makes it easier to set the base directory where the work directories for
+ application Context's are placed when virtual hosting sites with Tomcat.
-------------------
Jasper New Features:
@@ -94,6 +97,15 @@
resources from outside the Catalina home directory, using the request
dispatcher. This also implements the specification requirement that the
request dispatcher cannot extend outside the current servlet context.
+
+
+ServletContext tempdir (workDir): Fixed a spec compliance bug, SRV.3.7.1
+ states that the tempdir for a Servlet Context must be unique.
+
+ Added the Engine name as a directory path component when creating
+ the default work directory for a web application. This fixes a bug
+ where the same work directory would be used for the http and https version
+ of a virtual host.
----------------
--
To unsubscribe, e-mail:
For additional commands, e-mail: