To reduce this, you may use Resource Environment Provider instead of property files to store your properties, and then do a JNDI call to your app server to do get the values. These are possible for Websphere Application Server, Tomcat, etc. You just need to find how to do it in your application server.
The complete tutorial is in this link : http://www.ibm.com/developerworks/websphere/library/techarticles/0611_totapally/0611_totapally.html
What you require :
1. A class that implements ObjectFactory
2. A class that will be used to call get and set values.
1. Create a class library that implements an ObjectFactory. Here's the source code of what I did.
2. Now create a AppConfig class that is called by the factory.
3. Go to your Websphere Application Server and follow the steps as shown below :
4. Create a new provider.
5.Click on your provider.
6. Click on Referenceables and click on New. Add the Factory Class (AppConfigFactory) and the Class (AppConfig) that we've just created.
7. Click on Apply and Ok. Then go to Resource Environment Entries and create a JNDI.
8. Choose on your referenceable the AppConfigFactory that we just created. After adding, click on the Custom Properties.
9. Add the properties you need, and click apply and ok.
10. Add a JSP file on your application such as the code below :
11. Run your application. You should see your properties viewed. Try changing the properties on the custom properties and restart your application. Once run, you will see the latest changes.
Additional note. If a property in Websphere Application Server has a word password on it, it is automaticaly XORed. I guess this is the default mechanism of Websphere Application Server, to provide atleast a minimum security.