You can get the file path to the context from the ServletContext, provided it is not packaged as a WAR (not a good idea to make this assumption without checking) but you're right that the ClassLoader will not let you browse outside the entries on the classpath.
Joined: Jan 14, 2009
Yes I can found the file path to the context but if I try file.exist() the function return false to me ... The URI is correct but it seems, that it seems invisible.
I can also retrieve the path by ClassLoader but same problem occurred ...
Do you to a method like ServletContext.getResourceAsStream, but returning an outputstream of my file instead inputstream ?