I am having big issues deploying my web app to Tomcat 5.5
My server side code must access files found under a directory parallel to my WEB-INF folder.
When on developement mode, a simple relative path (mydirectory/myfile) works prefectly.
When deployed, the sayed path does not work anymore I dont know why.
Is there a way to make it work without using any absolute path?
Here is my War directory
- War
- WEB-INF
- Mydirectory
- Myfile
- Mywebbapp.html
Obtain your root folder relative to contextRoot by calling
javax.servlet.ServletContext.getRealPath("/"). Then proceed with this path…