2 Replies Latest reply on Jul 13, 2004 5:08 PM by aalmero

    Accessing files from Servlets or Classes

    S S Newbie

      I have the following code in one of my java files.

      public class DBHelper {

      static{
      try {
      Properties props = PropertyReader.getProps("\dbpool.properties");
      conMgr =
      } catch(Exception e ) {
      e.printStackTrace();
      }
      }
      }

      I get an exception saying that it could not locate the dbpool.properties file. I have placed this file in the myapp.war folder. So i think \dbpool.properties should get it.

      How do I access files like these from my utility classes like these. Note that this method most likely gets invoked from a jsp or servlet.

      Thanks in advance