I have to access a config file which is in a directory on the app server file system, but it is not deployed as part of my Java EE app.
Would getResourceAsStream() help me in this case?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not unless the config file is on the classpath, no. You’re going to have use
java.ioto 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.