I have to access a config file which is in a directory on the app server file system, but is not deployed as part of my J2EE app.
Would getResourceAsStream() help me in this case?
Thanks
I have to access a config file which is in a directory on the app server file system, but is not deployed as part of my J2EE app.
Would getResourceAsStream() help me in this case?
Thanks
Would
getResourceAsStream()
help me in this case?
Not unless the config file is on the classpath, no. You're going to have use java.io
to do what you need, unless you can convince the appserver to fetch it for you by some non-standard means.
This will take you outside of the JavaEE realm, and runs the risk of falling afoul of the appserver's security model.