I am retrieving an image blob form mysql and trying to the store the file in my WebContent/images folder.
When i write this in eclipse
path = "snap.jpg";
outputStream=new FileOutputStream(path);
It stores it in
D:\ani\eclipse-jee-juno-SR1-win32\eclipse
where as my current working Directory is
F:\workspace\EcWorkSpace\OnlineEduSys
which has all my contents.
when i try to give a relative path images/snap.jpg
java.io.FileNotFoundException: images\snap.jpg (The system cannot find the path specified)
whereas my images folder in my webcontent directory.
i have tried with prefix as / and ./ with the images folder and nothing works.
i have tried it in my webinf folder and it yields the same result.
Kindly help. Thanks in advance.