Title: RE: Réf. : Property file for a WAR

If you place your .properties file at the root of your WAR classpath ie (under WEB-INF\classes) then your class files can reference it relative to their position in the package directory structure.

i.e.

WEB-INF
   +---classes
          +------your.properties
          +------com
                  +---yourcompany
                           +---------YourClass.class

YourClass.class can load your.properties by refering to it as residing at

"..\..\your.properties"

Otherwise, if the properties file is used by only one class, you should be able to place it in the same package directory as that class and reference it as "your.properties".

If your context is marked as reloadable, then changes to the properties file at runtime will cause the context's classes to be reloaded.

cheers
Rory

-----Original Message-----
From: Søren Neigaard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 8:48 AM
To: 'Tomcat Users List'
Subject: SV: Réf. : Property file for a WAR


Eeeh? I know that my WAR file must be under webapps, what I need is some way
to have my own property file somewhere, and be able to at runtime to guess
where this property file is.

/Søren

-----Oprindelig meddelelse-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sendt: 3. juli 2002 14:02
Til: Tomcat Users List
Emne: Réf. : Property file for a WAR



You must add a Logger élément in serveur.xml in the context of your
application

Usually, war file must be in webapps under TOMCAT.

Jean-Christophe



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to