Load the properties using java.util.Properties, and store them in a place that 
is accessible in the war (like a static variable or context attribute).

If you are thinking about properties such as database/mail server connections, 
then keep the OUTSIDE of the war file, not in XML or other things that will 
require your sys admin to open war files and change them, or mix tomcat 
configuration with application database connection properties, etc.

A good place for you property files is [tomcat]/shared/classes. Property files 
in this folder are accessible to the war files via the standard class loader. 
The down side is that the same file is accessible to all, so if you need a 
separate configuration for each war you will have to use different file names.

E

----- Original Message -----
From: "Ken T." <ktectr...@gmail.com>
To: users@tomcat.apache.org
Sent: Thursday, October 22, 2009 9:58:33 AM (GMT-0800) America/Los_Angeles
Subject: Starting web app with properties set

I looked around online but couldn't find anything.  Is there a way to 
start a web application under Tomcat with specific properties mappings.  
Say I wanted to start my app with the property setting:

user.database=ProdDB

How would I go about doing so?

Thank you,


-- 
Ken T. <ktectr...@gmail.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to