Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2010-09-16 22:31:16 +0000
committerGreg Wilkins2010-09-16 22:31:16 +0000
commit7fb5d15d13e81e60560d31ccab1a1c4de87580c3 (patch)
treea5b6bacdd5593a563c261ca11a44514c65691534
parent62df1762d287540e7a3a7f41160265b7749984dd (diff)
downloadorg.eclipse.jetty.project-7fb5d15d13e81e60560d31ccab1a1c4de87580c3.tar.gz
org.eclipse.jetty.project-7fb5d15d13e81e60560d31ccab1a1c4de87580c3.tar.xz
org.eclipse.jetty.project-7fb5d15d13e81e60560d31ccab1a1c4de87580c3.zip
325468 Clean work webapp dir before unpack
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2284 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--VERSION.txt1
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java17
2 files changed, 12 insertions, 6 deletions
diff --git a/VERSION.txt b/VERSION.txt
index 05bce7d81f..86648291d1 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -34,6 +34,7 @@ jetty-7.2-SNAPSHOT
+ 325072 include to DefaultServlet of missing file throws FileNotFoundException
+ 325105 websocket ondisconnect fixed
+ 325128 websocket send during onConnect
+ + 325468 Clean work webapp dir before unpack
+ JETTY-912 added per exchange timeout api
+ JETTY-1245 Do not use direct buffers with NIO SSL
+ JETTY-1249 Apply max idle time to all connectors
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
index e3ddfb55c0..1775b84d0a 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
@@ -174,7 +174,9 @@ public class WebInfConfiguration extends AbstractConfiguration
{
File tmpDir=File.createTempFile(WebInfConfiguration.getCanonicalNameForWebAppTmpDir(context),"",template.getTempDirectory().getParentFile());
if (tmpDir.exists())
- tmpDir.delete();
+ {
+ IO.delete(tmpDir);
+ }
tmpDir.mkdir();
tmpDir.deleteOnExit();
context.setTempDirectory(tmpDir);
@@ -279,7 +281,7 @@ public class WebInfConfiguration extends AbstractConfiguration
// Last resort
tmpDir=File.createTempFile("JettyContext","");
if (tmpDir.exists())
- tmpDir.delete();
+ IO.delete(tmpDir);
tmpDir.mkdir();
tmpDir.deleteOnExit();
context.setTempDirectory(tmpDir);
@@ -337,7 +339,7 @@ public class WebInfConfiguration extends AbstractConfiguration
String old=tmpDir.toString();
tmpDir=File.createTempFile(temp+"_","");
if (tmpDir.exists())
- tmpDir.delete();
+ IO.delete(tmpDir);
Log.warn("Can't reuse "+old+", using "+tmpDir);
}
}
@@ -442,7 +444,7 @@ public class WebInfConfiguration extends AbstractConfiguration
//only extract if the war file is newer
if (web_app.lastModified() > extractedWebAppDir.lastModified())
{
- extractedWebAppDir.delete();
+ IO.delete(extractedWebAppDir);
extractedWebAppDir.mkdir();
Log.info("Extract " + web_app + " to " + extractedWebAppDir);
Resource jar_web_app = JarResource.newJarResource(web_app);
@@ -460,7 +462,6 @@ public class WebInfConfiguration extends AbstractConfiguration
throw new java.io.FileNotFoundException(war);
}
-
context.setBaseResource(web_app);
if (Log.isDebugEnabled())
@@ -479,7 +480,7 @@ public class WebInfConfiguration extends AbstractConfiguration
{
File extractedWebInfDir= new File(context.getTempDirectory(), "webinf");
if (extractedWebInfDir.exists())
- extractedWebInfDir.delete();
+ IO.delete(extractedWebInfDir);
extractedWebInfDir.mkdir();
Resource web_inf_lib = web_inf.addPath("lib/");
File webInfDir=new File(extractedWebInfDir,"WEB-INF");
@@ -488,6 +489,8 @@ public class WebInfConfiguration extends AbstractConfiguration
if (web_inf_lib.exists())
{
File webInfLibDir = new File(webInfDir, "lib");
+ if (webInfLibDir.exists())
+ IO.delete(webInfLibDir);
webInfLibDir.mkdir();
Log.info("Copying WEB-INF/lib " + web_inf_lib + " to " + webInfLibDir);
@@ -498,6 +501,8 @@ public class WebInfConfiguration extends AbstractConfiguration
if (web_inf_classes.exists())
{
File webInfClassesDir = new File(webInfDir, "classes");
+ if (webInfClassesDir.exists())
+ IO.delete(webInfClassesDir);
webInfClassesDir.mkdir();
Log.info("Copying WEB-INF/classes from "+web_inf_classes+" to "+webInfClassesDir.getAbsolutePath());
web_inf_classes.copyTo(webInfClassesDir);

Back to the top