I am using Apache Commons File Uploader API. It is working successfully when I use absolute path like this c:\\my uploads\\
. That is file will be uploaded to that place.
I am using NetBeans 7 for development. In my Project Tree, I have created another folder called uploads
. So when I use relative paths like uploads/
or /uploads/pics/
, it is not working. That is, there is no error. But file is not written to that folder. I am using a object of "File" and using its "write()" function.
My project folder structure is like:
-- C:\
-- -- my project\
-- -- -- school\
-- -- -- -- web\
-- -- -- -- -- index.jsp
-- -- -- -- -- fileupload.jsp
-- -- -- -- -- uploads\
-- -- -- -- -- -- pics\