In accordance with this Link :
You have few options.
1) Specify your own java.io.tmpdir java system property to use the pier.
$ java -Djava.io.tmpdir=/path/to/my/new/temp/ -jar start.jar
2) Create the "work" directory on the path ${jetty.home} (if so). This will force Jetty to use this working directory instead of what is set for the java.io.tmpdir property.
3) Specify the tempDir attribute in WebAppProvider deployments.
Valid for military file deployment scenarios only, NOT applicable for context-based deployment.
If you have etc/jetty-webapps.xml in start.ini , you have options for deploying military files.
Edit the file ${jetty.home}/etc/jetty-webapps.xml and add 1 more attribute to WebAppProvider. <Set name="tempDir">/path/to/my/preferred/temp/dir/for/all/webapps</Set>
4) Set the tempDirectory attribute to WebAppContext using context-based deployments. Not valid for deployment scenarios for military files.
If you have etc/jetty-context.xml in your start.ini , you have enabled context-based deployments.
Edit ${jetty.home}/contexts/myapp.xml and add the tempDirectory attribute to WebAppContext. <Set name="tempDirectory">/path/to/my/preferred/temp/dir/for/this/context</Set>
source share