Hi, I'd like to point out the dangerousness of workDir setting on Context. If workDir is an empty string, i.e. workDir=AA, then workDir will be set as CATALINA_HOME. Therefore if application will be reloaded, then the files in CATALINA_HOME will be deleted. I know this problem is caused by wrong configuration, but it is too dangerous, anyway. I propose a patch. Index: /trunk/java/org/apache/catalina/core/StandardContext.java =================================================================== --- /trunk/java/org/apache/catalina/core/StandardContext.java (revision 565643) +++ /trunk/java/org/apache/catalina/core/StandardContext.java (working copy) @@ -5006,7 +5006,7 @@ // Acquire (or calculate) the work directory path String workDir = getWorkDir(); - if (workDir == null) { + if (workDir == null || workDir.length() == 0) { // Retrieve our parent (normally a host) name String hostName = null;
Many thanks for the patch. It has been applied to trunk and proposed for 6.0.x and 5.5.x.
The patch has been applied to 6.0.x and will be in 6.0.17 onwards.
This has been fixed in 5.5.x and will be included in 5.5.27 onwards.