This content has been marked as final.
Show 1 reply
-
1. Re: Problem with system.getproperties(
jaikiran Jul 28, 2006 3:39 AM (in response to gupta.amit)You need not place the property file outside your application. You can package this property file as part of your application(may be in the same jar/war in which your servlet is present) and later on in your code of servlet, you can retrieve the same as follows:
Servlet { init() { InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("yourPropertiesFileName.properties"); java.util.Properties props = new Properties(); props.load(inputStream); } }
You will find more information on this here:
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html