tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goss <mg...@rtci.com>
Subject Re: properties
Date Tue, 05 Dec 2000 14:38:28 GMT
andreas,
place your properties file in the same location as your classes and try the
following... I've been doing it this way for a while now with no
problems...
<snip>
InputStream is = getClass().getResourceAsStream("/rollout.properties");
      Properties props = new Properties();
      try
      {
         props.load(is);
      }
      catch (Exception e)
      {
         logger.log("Can't read the properties file. " +
            "Make sure rollout.properties is in the CLASSPATH",
            LogWriter.ERROR);
         return;
      }
</snip>
Matt Goss

andreas ebbert wrote:

> Hi there,
> does anybody know where
> to put property-files for servlets
> so that tomcat finds them?
> I tried to place them in the
> same location as the .class-
> -file but that didn´t work, any
> idea´s?
>
> regards,
> andreas
>
> -----------------------------------------------------------------------
> Andreas Ebbert, Kuthstrasse 43, 51107 Koeln
> e-mail: ebbert@imm.rwth-aachen.de
> Fon: 0221-8701503,        Fax: 0221-5345842
> -----------------------------------------------------------------------

Mime
View raw message