Where to place configuration files when using WAR-Files

Discussion in 'Java' started by Stephan Koser, Dec 7, 2004.

  1. 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.

    --
    bye Stephan...
     
    Stephan Koser, Dec 7, 2004
    #1
    1. Advertising

  2. Stephan Koser

    Guest

    Stephan Koser wrote:
    > 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?
     
    , Dec 7, 2004
    #2
    1. Advertising

  3. <> schrieb im Newsbeitrag
    news:...
    >
    > Stephan Koser wrote:
    > > 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?


    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.

    --
    bye Stephan...
     
    Stephan Koser, Dec 7, 2004
    #3
  4. Stephan Koser

    Juha Laiho Guest

    "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.
    --
    Wolf a.k.a. Juha Laiho Espoo, Finland
    (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
    PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
    "...cancel my subscription to the resurrection!" (Jim Morrison)
     
    Juha Laiho, Dec 7, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    0
    Views:
    861
  2. Miguel De Anda

    Config files in .war files?

    Miguel De Anda, Aug 14, 2003, in forum: Java
    Replies:
    2
    Views:
    408
    Miguel De Anda
    Aug 15, 2003
  3. Andy Fish
    Replies:
    0
    Views:
    305
    Andy Fish
    Jun 23, 2004
  4. thebad1
    Replies:
    3
    Views:
    1,773
    thebad1
    Feb 2, 2007
  5. wallge
    Replies:
    1
    Views:
    501
Loading...

Share This Page