I've just started using Jetty (ver 7.0.2) on CentOS 5.5 and have deployed a webapp with the default settings (by just placing my war file in the /webapps directory). When Jetty starts up, it extracts the war into the /tmp/jetty{something-warfilename-etc} directory.

I understand that Jetty has loads of custom configuration that can be implemented, for now however, I am just interested in setting the location for the extracted war files so that I can modify .properties files etc on the fly safely.

Hits head against desk You know when you're searching so hard for something that you expect to be complicated, meanwhile the simplest solution is sitting right in front of you? Well, this was that for me. :) Thanks blahdiblah.
–
XandelSep 24 '11 at 15:03

If you do this and you just get a 404 as if you didn't put anything anywhere... this might be because you're running under Java Service Wrapper and you didn't set jetty.home.
–
romkynsMar 1 '13 at 20:09

@blahdiblah I am not able to deploy the web apps in my desired location, any help related to it would be appreciated. I have tried to set the Temp Directory in jetty-webapps.xml and also I tried to configure Temp Directory via configureTempDirectory of class WebInfConfiguration in Jetty but of no respite. could you please help me in this context?
–
Rahul TanejaSep 26 '14 at 13:11

I know this question is old, but I wanted an answer to this that was a configuration parameter, not an unpacked war solution. The configuration solution is to add the following parameter to the WebAppProvider (in 8.1.8, this is in jetty-webapps.xml):

<Set name="tempDir"><New class="java.io.File"><Arg>/usr/local/jetty-8.1.8/work</Arg></New></Set> did not help me, I put this line in jetty-webapps.xml , but Jetty still deploys the web app in System Temp Directory. Could you please tell me if there is anything which is required to be set aside of it?
–
Rahul TanejaSep 26 '14 at 13:07