Where to place configuration files when using WAR-Files

S

Stephan Koser

Hi,

we'd like to provide our web application as a WAR-File. Up to now we have
our configuration files inside the WEB-INF directory.
But we don't want to force our clients to unpack, edit and pack the war file
if they want to configure the application. Instead we want to provide a
configuration dialog at the first call of our application.
But the question is: Where to place the configuration?

We don't want to put it in the WAR file. So, are there any standards in J2EE
where to place configuration files, that may change during runtime?
Any hints?

thank you.
 
M

monroeds

Stephan said:
Hi,

we'd like to provide our web application as a WAR-File. Up to now we have
our configuration files inside the WEB-INF directory.
But we don't want to force our clients to unpack, edit and pack the war file
if they want to configure the application. Instead we want to provide a
configuration dialog at the first call of our application.
But the question is: Where to place the configuration?

We don't want to put it in the WAR file. So, are there any standards in J2EE
where to place configuration files, that may change during runtime?
Any hints?

Your question is highly container dependent. What container are you
using?
 
S

Stephan Koser

Your question is highly container dependent. What container are you
using?

Well, we try to support as many App-Servers as possible.
Up to now: Tomcat, OC4J, Oracle IAS, IBM WebSphere, Bea WebLogic and some
others that are not well known.

The solution should work with as many as possible.
 
J

Juha Laiho

Stephan Koser said:
we'd like to provide our web application as a WAR-File. Up to now we have
our configuration files inside the WEB-INF directory.
But we don't want to force our clients to unpack, edit and pack the war file
if they want to configure the application. Instead we want to provide a
configuration dialog at the first call of our application.
But the question is: Where to place the configuration?

We don't want to put it in the WAR file. So, are there any standards in J2EE
where to place configuration files, that may change during runtime?

You might check whether you can provide the configuration through JNDI
subsystem. Perhaps even let go of the actual configuration file altogether,
and move the individual variables into entries in the JNDI naming hierarchy.

Or then just pass the conf.file name as a JNDI resource.

Works for "big" app.servers, and works for Tomcat from at least 4.1 versions.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top