For every context make an Entry into your web.xml and add a servlet which
loads on start up.
The each servlet loads your properties file.
and Use URL mapping, to load the appropirate servlet.
HTH,
Shuklix
-----Original Message-----
From: Bryan Connor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 8:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Context loading of .properties files
Here is another way to thinkabout it...
Create a config table in your database that holds all the properties you
need to run your app.
One record for each context - the key will be the different URL each context
uses. On startup, use the URL to hit the database for the record with the
correct properties and go from there. Keep everything in the database.
Bryan
[EMAIL PROTECTED] wrote:
>
> I have several contexts which use a ".properties" file for configuration.
�I
> need each context to have its own version of that configuration file. �Is
> there a way to load properties files based on context? �I am looking for a
> way to load properties files that is similar to the way in which class and
> lib files are loaded by the servlet class loader. �Ideally, the properties
> files would be automatically loaded from some place under the WEB-INF
> directory of a given contest.
> �
> Thanks,
> ron
>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/