Forums Register Login

Configuration for web application

+Pie Number of slices to send: Send
Hi!

I need to configure my web application. Settings like database connection parameters or log file location.
I don't want to include a configuration file inside my WAR file - I want it to be accessible from outside.

What is the common solution for this problem?

Thanks,

Bernhard
+Pie Number of slices to send: Send
Bernhard,
A common solution is a property file. You can place it anywhere on the server and update your classpath to include that directory.
+Pie Number of slices to send: Send
I'd second that. Put the system configuration using a .properties file,

you can use ln -s to link your file, and restrict access to the file using simple UNIX permission.

if you want, you can also try something fancy like using a database table to store the configuration (one record per system instance) but I see no reason in NOT using the .properties approach. it's simply effective.
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 564 times.
Similar Threads
Hibernate : Could not parse mapping document from resource
Cannot login into tomcat
web.xml --- failover for DBs (Urgent)
Hibernate-Servlets-JSPs
commons configuration
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:55:41.