Re: Best practice? configuration of a web application

2008-05-29 Thread Ingo Siebert
Mikolaj Rydzewski wrote: Ingo Siebert wrote: I see one additional problem. If I deploy two different versions of the web app on the same tomcat, it is not possible configurate them separately. That's important for me, because I have only a limited number of servers and I have to deploy

Re: Best practice? configuration of a web application

2008-05-29 Thread Mikolaj Rydzewski
Ingo Siebert wrote: JNDI is an additional complexity to my app. It feels wrong to use JNDI only to get a simple file path or a base file path. I primary configuration values are many but simple string values like a JDBC-URL or JDBC-Options. I think the complete abstraction of the DataSource is

Re: Best practice? configuration of a web application

2008-05-28 Thread David kerber
Ingo Siebert wrote: Hi, I have to find a good solution for the configuration of my web application. Right now, i have a configuration file in my WAR. But I think it's not the best solution, because - I can't the change the config before deployment - a redeployment of a new WAR replaces my

Re: Best practice? configuration of a web application

2008-05-28 Thread Mikolaj Rydzewski
David kerber wrote: -DmyApp.configFileName=e:\TomcatClients\myApp\myApp.properties Then my webapp can read the filename using a System.getProperty() call. System properties are at JVM level, so it is quite possible to have two webapps which will use common property names. -- Mikolaj

Re: Best practice? configuration of a web application

2008-05-28 Thread Mikolaj Rydzewski
Ingo Siebert wrote: I have to find a good solution for the configuration of my web application. Right now, i have a configuration file in my WAR. But I think it's not the best solution, because - I can't the change the config before deployment - a redeployment of a new WAR replaces my

Re: Best practice? configuration of a web application

2008-05-28 Thread David kerber
Mikolaj Rydzewski wrote: David kerber wrote: -DmyApp.configFileName=e:\TomcatClients\myApp\myApp.properties Then my webapp can read the filename using a System.getProperty() call. System properties are at JVM level, so it is quite possible to have two webapps which will use common property

Re: Best practice? configuration of a web application

2008-05-28 Thread Mikolaj Rydzewski
David kerber wrote: Mikolaj Rydzewski wrote: David kerber wrote: -DmyApp.configFileName=e:\TomcatClients\myApp\myApp.properties Then my webapp can read the filename using a System.getProperty() call. System properties are at JVM level, so it is quite possible to have two webapps which will

Best practice? configuration of a web application

2008-05-28 Thread Ingo Siebert
Hi, I have to find a good solution for the configuration of my web application. Right now, i have a configuration file in my WAR. But I think it's not the best solution, because - I can't the change the config before deployment - a redeployment of a new WAR replaces my changes I think nearly

Re: Best practice? configuration of a web application

2008-05-28 Thread Ingo Siebert
Thank you for the answers. I see one additional problem. If I deploy two different versions of the web app on the same tomcat, it is not possible configurate them separately. That's important for me, because I have only a limited number of servers and I have to deploy more than one version

Re: Best practice? configuration of a web application

2008-05-28 Thread David kerber
Ingo Siebert wrote: Thank you for the answers. I see one additional problem. If I deploy two different versions of the web app on the same tomcat, it is not possible configurate them separately. That's important for me, because I have only a limited number of servers and I have to deploy

Re: Best practice? configuration of a web application

2008-05-28 Thread Mikolaj Rydzewski
Ingo Siebert wrote: I see one additional problem. If I deploy two different versions of the web app on the same tomcat, it is not possible configurate them separately. That's important for me, because I have only a limited number of servers and I have to deploy more than one version at the

Re: Best practice? configuration of a web application

2008-05-28 Thread Jost Richstein
Add a context-parameter to your web.xml pointing to a resource (a file or whatever) that contains your configuration. Read that configuration during startup of your webapp. Original-Nachricht Betreff: Re: Best practice? configuration of a web application Von: Ingo Siebert

Re: Best practice? configuration of a web application

2008-05-28 Thread Mark H. Wood
If I wanted to do that, I'd explicitly create the application context (that is, make a context descriptor file at $CATALINA_HOME/conf/Catalina/$HOST/$APP/context.html) and enclose a context-parameter to point to the configuration file. And I don't think it's at all unreasonable to want to do

Re: Best practice? configuration of a web application

2008-05-28 Thread Juha Laiho
Mikolaj Rydzewski wrote: Ingo Siebert wrote: I have to find a good solution for the configuration of my web application. Right now, i have a configuration file in my WAR. But I think it's not the best solution, because - I can't the change the config before deployment - a redeployment of a

Re: Best practice? configuration of a web application

2008-05-28 Thread Mikolaj Rydzewski
Juha Laiho wrote: Then the interface between container and application will be documented as: The application requires data element XXX in container JNDI context, in order to locate YYY. This way (when taken to completion) it becomes possible to deploy exact same .war file into test and

Re: Best practice? configuration of a web application

2008-05-28 Thread Mark Thomas
Mikolaj Rydzewski wrote: Very good! Should be in the FAQ. The FAQ is hosted on a public wiki. There is nothing stopping you (or anyone else) adding to it. Mark - To start a new topic, e-mail: users@tomcat.apache.org To