commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Comer" <>
Subject FileUpload - deletion of temp files problem
Date Tue, 01 Jul 2003 08:06:37 GMT
Hi there,
I have some servlet code that is correctly uploading two files however
two parameters that are passed to the servlet are also creating temp
files that I am unable to delete until resin restarts. As this will be
infrequent I need to resolve this. I can see that File.deleteOnExit() is
called but I have also explicitly called FileItem.delete()
I have modified Fileitem.delete() to return a boolean (which incidently
I would have thought to be a good idea anyway...shall I pass this to the
dev forum?)
public boolean delete()
        byteStream = null;
        content = null;
        boolean ret = false;
        if (storeLocation != null && storeLocation.exists())
            ret = storeLocation.delete();
        return ret;

This always returns 'false' !!!
Any clues ?

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003

View raw message