Another possibility is that the Java process that is trying to delete the
file may not have the right permissions to do so. The method 'delete()'
will generate a 'SecurityException' if it encounters a problem during file
deletion, so you may want to enclose the 'delete()' logic in a try-catch
block to see if you're getting such an error and print out either the error
message string or a stack trace to help you find out what could be wrong.
-----Original Message-----
From: Gopi Mandava [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 8:03 AM
To: [EMAIL PROTECTED]
Subject: Re: File Deletion----not working
Make sure the file exists on the system before you do the delete. My guess
is the path name isn't complete.
Try:
if (file.exists())
file.delete();
else
// debug("file "+ file.getAbsolutePath()+" doesn't exist");
> I am trying to delete a file under filesystem in a bean using:
>
> File f=new File(path-to-file);
> f.delete();
>
> But the File isnt getting deleted...Can anybody help??
>
>thanx
>Deeps
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
-----------
Gopi Mandava (703) 267-1735 x307
CoManage Inc.
"I don't think God put me on this planet to judge others. I think he put me
on this planet to gather specimens and take them back to my home planet."
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets