----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

The following code fragment demonstrates a way to access a file that is
supposed to reside in the servlet zones classpath directory (right next to
the "com" or country top level domain).


      InputStream is =
getClass().getResourceAsStream("/application.properties");
      dbProps = new Properties();
      try
      {
         dbProps.load(is);
      }
      catch (Exception e)
      {
         logWriter.log("Can't read the properties file. " +
            "Make sure application.properties is in the CLASSPATH",
            LogWriter.ERROR);
         return;
      }
      String logFile = dbProps.getProperty("logfile");


Hope this helps.

Regards

Bruno Wenger

----------------------------------------------------------------------------
-------------------
K&W Software AG
Rosenbergstr. 1
CH-8304 Wallisellen



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to