Ingo Siebert wrote:
Hi,
I have to find a good solution for the configuration of my web
application.
Right now, i have a configuration file in my WAR.
But I think it's not the best solution, because
- I can't the change the config before deployment
- a redeployment of a new WAR replaces my changes
I think nearly every web application has a configuration. I am
thinking about to put my configuration data in the /etc folder. My web
application only needs to know where to find the file (in this case
/etc/myconfing.xml).
But how does it know the location? I think the location must not be
stored in the WAR, because it leads me to the same problem than before.
Does someone have any other idea than storing the config file in /etc?
What is the "best practice"?
I doubt it's a "best practice", but what I do is keep it elsewhere on
the HD, usually (though not always) in the parent folder of the webapps
folder, and specify its location with a -D option in the java startup
configuration, something like:
-DmyApp.configFileName="e:\TomcatClients\myApp\myApp.properties"
Then my webapp can read the filename using a System.getProperty() call.
D
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]