Stefan,
>From your Action class, you can call either
ActionForm.getMultipartRequestHandler().rollback() to destroy all temporary
files, or you can call the destroy() method of each individual FormFile in
your ActionForm class. That will get rid of any temporary files created.
For example:
if (this.isCanceled(request)) {
form.getMultipartRequestHandler().rollback();
return mapping.findForward("predecessor");
}
-----Original Message-----
From: Stefan Wesner
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 11/20/00 10:42 AM
Subject: Questions on the file upload package
Hi,
i just uploaded successfully files using the upload.* classes and
running
resin as the servlet engine.
Some questions:
The file upload is one tasks within a couple of web pages. On every page
you
can go back. I use the cancel button for this purpose and I have a line
if( this.isCancelled(request) )
{
return mapping.findForward("predecessor");
}
in order to find out if the user wants to go back or wanted to perform
the
action (in this case the processing of the uploaded file)
* I assume that the file is already uploaded at this point an nothing
can
prevent this. Beside the fact that "isCancelled" never return true (How
to
make it correct ?) do I need to make some wrap up in order to delete the
temporaries ?
(In this case a JavaScript function that goes back in history seems to
be
more appropriate)
* If the user proceeds and returns (for whatever reason) back to the
upload
page I wonder why the file text field is not filled out "by magic" like
the
other fields from the Form.
Anything special that has to be done in order to reach this ?
Kind regards,
Stefan Wesner.
--
Dipl.-Ing. Stefan Wesner Head of Software Technology Group
phone: +49 (0)711 685-4275 fax: +49 (0)711 682-357
mailto:[EMAIL PROTECTED]
Rechenzentrum Universit�t Stuttgart 70550 Stuttgart Germany
<<Stefan Wesner.vcf>>