I have the following code snippet:
String path = servletContext.getRealPath("/");
Now I have an error from a user saying that the returned path is not an absolute path. The return path is " usr/local/..." instead of " /usr/local/...'", so getRealPathit seems to return a relative path.
I see this because the return path is written to the log file.
My specifications:
- JBoss 4.0.5.GA
- Redhat EL 4
- jdk 1.5.0
See here for javadoc
source
share