On 27/06/2012 17:19, Konstantin Kolinko wrote:
> Hi!
>
> I was experimenting with Servlet 3.0 file upload. What seems odd is
> that after request is processed the uploaded files are still present
> in the work directory of the web application.
>
> The only way to reliably delete those files is what HTMLManagerServlet
> does, like
>
> Iterator<Part> iter = parts.iterator();
> while (iter.hasNext()) {
> Part part = iter.next();
> part.delete();
> }
>
> but when I use simpler code like request.getPart("file"); to directly
> access the field that I need it feels odd that I need to explicitly
> iterate over parts to perform the cleanup.
I don't see the harm in automatically cleaning up a the end of the request.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]