Hi All
I was trying to save an uploaded file at the location where application(war) is deployed on tomcat server(free hosting plan) by trying
getServletContext().getRealPath() but it returned null instead of path but this worked on local machine
. Than I tried to save files to local filesystem on server (let us suppose /var/tmp/../file/) but it thrown an exception
Permission denied even though the server gets the locations write and read permissions as true
. Below is the code:-
I doubt that the problem is with the security policy of the hosting service but not sure
. So guys can you please suggest on this.
Thanks in advance