HI,
I uploaded some images in the server using
jsp.
I stored the file in a folder within the server.
I want to delete those files from server.For that i used the following piece of code,but it is not working
File f = new File("path where the file is stored");
FileInputStream fstream = new FileInputStream(f);
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
br.close();
fstream.close(); //new
if(f.delete()) //new
{
out.println("file deleted");
}
Can anyone help me in this?
Thanx a lot in advance