In glassfish, the warfile is also exploded to a directory, and it is possible to write there.
Maybe getServletContext().getAttribute("javax.servlet.context.tempdir") helps you?
[Message sent by forum member 'batzee' (batzee)]
http://forums.java.net/jive/thread.jspa?messageID=273105