S
Sven Jacobs
Hello everybody,
I'm new to the Java world writing my first Java web application with JSF 1.1
and Tomcat 5.5. I have the following problem:
I've created a Properties file and placed it in the WEB-INF directory of the
web application. The file contains several configuration options like
database parameters. I want to open this file within my web application
with a FileInputStream which I pass to the load() method of a Properties
object. Unfortunately I was unable to determine the path of the WEB-INF
directory of the current web application. I don't want to write the path
hard coded into the source code.
Maybe my way is not the correct "Java way" of solving this kind of problem
so I'm not only interested in an answer to my question but also in
suggestions how to solve this problem in a better way.
Thank you!
I'm new to the Java world writing my first Java web application with JSF 1.1
and Tomcat 5.5. I have the following problem:
I've created a Properties file and placed it in the WEB-INF directory of the
web application. The file contains several configuration options like
database parameters. I want to open this file within my web application
with a FileInputStream which I pass to the load() method of a Properties
object. Unfortunately I was unable to determine the path of the WEB-INF
directory of the current web application. I don't want to write the path
hard coded into the source code.
Maybe my way is not the correct "Java way" of solving this kind of problem
so I'm not only interested in an answer to my question but also in
suggestions how to solve this problem in a better way.
Thank you!