RE: R�f. : Property file for a WAROk but cant I place it somewhere outside
the WAR file, and still be able to guess where it is at runtime, relative to
my classes? This way it's just a file on the filesystem, and I can discover
changes at runtime.

/S�ren
  -----Oprindelig meddelelse-----
  Fra: Douglas, Rory [mailto:[EMAIL PROTECTED]]
  Sendt: 3. juli 2002 15:00
  Til: 'Tomcat Users List'
  Emne: 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]>

Reply via email to