tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Voronoff, George" <>
Subject RE: Custom server-wide properties
Date Fri, 22 Sep 2000 00:12:03 GMT
Here is how I do it.  Any feedback would be appretiated.
We put a single property file in $TOMCAT_HOME/classes.  This property file
has one property hostname=foo
Then, we have two other properties files (that we share across all of our
One property file has basic global propertis that are uniq across all hosts:
The second property file is configurable on a host by host basis.
When looking for some global value say "CacheSize.Max"  we first look in
the server specific file for a property called foo.CacheSize.Max.  If we
find it there, then we look in the second propery file for CacheSize.Max.
Our utility lookup functions prepend hostname to the property so the client
code does not know weather this is a host configurable property or a global
Also, the nice thing about this is that if we think that something is a host
variably, we keep a  seperate property for each host, but if we later decide
that this
was actualy just a global property, we can pull it out ot one property file,
and put it
into the other.

-----Original Message-----
From: Allen Akers []
Sent: Friday, September 15, 2000 7:34 AM
Subject: Custom server-wide properties

I was looking through the server.xml to try to find a way to put in a custom
property that would be visible to all web applications within a Tomcat
server, but I can't seem to find it.  We have a development web server and
several production web servers and I need to be able to move my code from
one to the other without changes, but have a mechanism whereby the web
server in which they are running can tell them whether they are development
or production, so that they will point to the appropriate back-end systems
(which also have development and production systems).  Thanks.
               Allen Akers
               Programmer Analyst
               Strategic Web and Voice Development

View raw message