Why do you need to keep the properties file on the filesystem outside the app? Cant you package it as a part of your webapp?

Ivan Davidov

Greenhorn

Posts: 6

posted 10 years ago

This is only for example, in the real case I have multiple .properties files + multiple additional resources which can be at any place in the file system. I have specifications which say that the location is to be defined later => it is random for now and most probably will to stay random (changable location).

Yes, I can package the .properties file in the WAR or include the directory of .properties file to the classpath of my JBoss.

We had a similar requirement. We had to build an EAR and deploy the same EAR to all environments, but some configuration had to be different in each. It was XML, not properties so it's not exactly the same. Can you just code the full path to your properties file? c:\folder\file or /home/folder/file

BTW: We got out of this business and put all the config in a database table. Each environment has its own database.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi