I've got a web application that uses some Java classes to write out files to a directory under the web application root. With an exploded WAR file the files can be written to the directory and then users can grab them via a url.

Is it possible to use this mechanism with a jar'd WAR file? Would this be an app server dependency? I assumed that the war file would be exploded somewhere and that the servletcontext object would have the true path to where on the computer the exploded war was, but this is not the case.

Bottom line - has anyone figured out how to write files to WAR file at runtime so that clients cna then download files via url?

Any ideas would be great.