hi all, i have a servlet which writes something to a text file(say filename.txt).i want that whenever the servlet is executed again then it should delete the already existing filename.txt and create a new one.how can this be done..please help..its urgent..(i tried File.delete() but it throws some weird exception and doesnt let me delete the file)... PS-can file deletion be done from an applet? thanks a ton regards karan
Jonathan W. Brett
posted 16 years ago
Why delete it? It should overwrite the file anyways. But after saying that, delete() should work. It works for me . .. .