zeratul021
zeratul021

Reputation: 2694

What's the preferred way to load web application specific configuration and settings in java

I was wondering what is the usual way for you to load application settings in web applications. I'm just looking around because I had only needed this once and we required user to specify environment variable with path set to the configuration file which we loaded in the spring context. My point is not the loading (whether xml or properties) but the location and locating of the file, what do you think is the preferred way.

Regards,

Marek

Upvotes: 0

Views: 244

Answers (3)

meriton
meriton

Reputation: 70564

We usually populate the JNDI environment in the context descriptor.

Upvotes: 1

Jigar Joshi
Jigar Joshi

Reputation: 240860

Placing properties file in User's home directory is a good option

Upvotes: 2

jzd
jzd

Reputation: 23629

It depends, but storing settings either in a properties text file locally, or in a database table are two common ways.

Upvotes: 1

Related Questions