SECTION: 250-Configuration TITLE: 210tempdir QUESTION: Where are Jetty's temporary directories? Jetty itself has no temporary directories, but each web application can be assigned a temporary directory. If the web application is a WAR file, it may be unpacked to the webapp directory within the web applications temporary directory.
When assigning a temporary directory to a webapplication the following locations are considered:
If a temporary directory is created, it is given a name based on the first HttpListener within the HttpServer as follows: "jetty_" + listener.getHost() + "_" + listener.getPort() + "_" + virtualHost + "_" + contextPath
Directories created within the java.io.tmpdir are marked as deleteOnExit and are not reused between invocations of the web application context. Other directories, specifically the work directories, are not deleted by Jetty and may be available between runs of the webapplication.
Once a tempory directory has been allocated, a File instance for it is set as the javax.servlet.context.tempdir attribute of the web application.