This is not a permission problem. Your trying to access a file via r(e)quest.getContextPath()
which is used for web access (not file system!)
If you want to access files in your workspace/deploy location of your project via the file-system, you should use on of the following methods:
Resource myData = new ClasspathResource("myData.xml"): - this will be relative to WEB-INF deploy directory
or:
new File(servletRequest.getSession().getServletContext().getRealPath("/")+"/your-path-relative-to-WEB-INF-deploy-path");
I personally recommend method #1
EDIT
Your questions suggests that you think your src
folder is being deployed (copied to the server with your WAR/EAR/Built project, this is usually not true. Normally, the Webpages folder (whatever name you call it within your app) and everything inside of WEB-INF is being deployed. hoping this was helpful.