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

Reply via email to