Deepak wrote:
Hi,
What is the default location of a file uploaded using html:file ? Can I upload it to one of the folders in my context path ?
It goes someplace temporary. If you look at the src for the UploadAction
example in Struts, it shows how to save the temporary file.
I create a temporary dir with sessionCreated() in the
HttpSessionListener ie myapp/temp/sessionID
then you can get to it via
session.getServletContext().getRealPath(temp) + /+ session.getId();
and create an outputstream that goes there.
When the session is destroyed I remove the files and the dir
myapp/temp/sessionID
thanks
Deepak
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]