Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.0.2
-
Fix Version/s: 6.1.0rc0
-
Component/s: None
-
Labels:None
-
Environment:Java 1.5.0_08 on either Windows XT or Linux
-
Number of attachments :
Description
I have two web applications that are deployed from war files. The two applications have different context paths defined in their web-jetty.xml file, but both end up with the same temporary file. (Actually, when the second war is unpacked, the contents of the first are lost.)
Here are some snippets from the debug log:
2006-11-30 15:31:41.911::DEBUG: Created temp dir C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___ for org.mortbay.jetty.webapp.WebAppContext@29ce8c{/,null}
2006-11-30 15:31:41.943::INFO: Extract jar:file:/C:/projects-3.x/redcondor/build/services.war!/ to C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___\webapp
2006-11-30 15:31:41.943::DEBUG: Extract jar:file:/C:/projects-3.x/redcondor/build/services.war!/ to C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___\webapp
a few moments later:
2006-11-30 15:31:42.755::DEBUG: Created temp dir C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___ for org.mortbay.jetty.webapp.WebAppContext@59a34{/,null}
2006-11-30 15:31:42.771::INFO: Extract jar:file:/C:/projects-3.x/redcondor/build/dashboard.war!/ to C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___\webapp
2006-11-30 15:31:42.771::DEBUG: Extract jar:file:/C:/projects-3.x/redcondor/build/dashboard.war!/ to C:\DOCUME~1\JEFFRE~1.AGU\LOCALS~1\Temp\Jetty_0_0_0_0_80___\webapp
The services.war declares
<Configure class="org.mortbay.jetty.webapp.WebAppContext"><Set name="contextPath" type="String">/services</Set></Configure>
in web-jetty.xml. The dashboard.war run as a root context and does not declare a context path. Neither of the two webapps have virtual hosts defined.
In reading (an older) Jetty FAQ, the assigned temporary file names appear to be incorrect.
It took me a little while to get my head around this, but suddenly the cause is obvious. (Not sure what the best fix is though)
You wrote: "The services.war declares [the context path] in web-jetty.xml", but that's not read until after the war file is expanded. At the time of expansion both the war files have a blank context path.
The simplest work around for you would be to put some sort of context path for services.war inside your main jetty.xml (or which ever file you have doing the deploying). That will force the expansion directories to be different.
Perhaps we need to include the identity hashcode of the WAC in the deployment directory?