From 2.4.4 you can create an unpacked war.
This is a directory structure that looks like a war,
make the directory something like myapp.war
JBoss just deploys it without copying.
IMHO, you should not be writing back into the unpacked app
1. The webcontainer may not even unpack, but run packed.
2. You may not have perms to write there.
3. what does it gain you ? (garbage collection I assume)
use File.deleteOnExit() (garbage collection)
I have a similar problem, In my case users can upload images, which is getting stored in the
But if i stop the server all the data is lost.
The other way round if i store the data outside the temp deploy dir. How to i give a link to the image.