webapps: where to store configuration files?

M

Moiristo

I use resource bundles in my webapp to read .properties-files, which
contains configuration files and button text. The problem is that these
files are contained within the webapp. If someone redeploys the webapp
using the WAR file, the configuration files are overwritten and
configuration data is lost. Where should I save this data?


TIA,

Moiristo
 
V

Vincent van Beveren

Moiristo said:
I use resource bundles in my webapp to read .properties-files, which
contains configuration files and button text. The problem is that these
files are contained within the webapp. If someone redeploys the webapp
using the WAR file, the configuration files are overwritten and
configuration data is lost. Where should I save this data?

You could use the Preferences object to save data in the registry. If
all fails you could store the database URL in the registry and create a
config table with key/value pairs. Another option is to specify a 'data'
location in the web.xml, or pass it as a system property at run-time.
You can also configure your app using JMX for example. There are many
ways :)

good luck,
Vincent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,785
Latest member
undedgini

Latest Threads

Top