geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r786754 - /geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
Date Sat, 20 Jun 2009 04:09:02 GMT
Author: xuhaihong
Date: Sat Jun 20 04:09:02 2009
New Revision: 786754

URL: http://svn.apache.org/viewvc?rev=786754&view=rev
Log:
GERONIMO-4698 Jetty7 could not handle the non-existed temp path

Modified:
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java?rev=786754&r1=786753&r2=786754&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyWebAppContext.java
Sat Jun 20 04:09:02 2009
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.jetty7;
 
+import java.io.File;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -195,7 +196,12 @@
         if (workDir == null) {
             workDir = contextPath;
         }
-        this.webAppContext.setTempDirectory(jettyContainer.resolveToJettyHome(workDir));
+        File tempFolder = jettyContainer.resolveToJettyHome(workDir);
+        if (!tempFolder.exists()) {
+            tempFolder.mkdirs();
+            tempFolder.deleteOnExit();
+        }
+        this.webAppContext.setTempDirectory(tempFolder);
 
 
         //install jasper injection support if required



Mime
View raw message