Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Cleaning temp directory

Il 20/02/2014 15:19, Joakim Erdfelt ha scritto:

Uhm, so there is something in my setup that broke this behaviour, because after stopping jetty I have

ls -la jetty_tmp/start*.properties | wc -l
21

I set java.io.tmpdir and I use an upstart script to start jetty


As for the webapp specific temp directory, that has many configurables and knobs available both from jetty and the servlet spec for you to manipulate.

First: how to specify the location of the temp directory ...

Ok, I use java.io.tmpdir to move my temp directory to a certain path

Only for one app (started thorugh xml context) I set tempDir explicit


Next: the cleanup.
In your Jetty IoC Context Deployable XML you can configure the following (available in Jetty 9.1+)
<Set name="persistTempDirectory">false</Set>

But this is related to webapp start/stop or is checked also when jetty stops? I didn't set persistTempDirectory, but If I remove the symlink in webapps folder the temp directory is removed; my problem is that if I stop jetty all temp directory remain on disk (as start$random.properties)

-- 
Andrea Cappelli

Back to the top