1. import java.util.Properties;
  2.  
  3. ...
  4.  static String profilepath="webapps/ROOT/WEB-INF/server.properties";
  5.      private static Properties props = new Properties();
  6.  
  7.         static {
  8.              try {
  9.                 props.load(new FileInputStream(profilepath));
  10.             } catch (FileNotFoundException e) {
  11.                 e.printStackTrace();
  12.             } catch (IOException e) {       
  13.                 e.printStackTrace();
  14.             }
  15.         }
  16.           
  17.         public static String getKeyValue(String key) {
  18.             return props.getProperty(key);
  19.         }           
  20.      //the directory that is used to store lucene index
  21.   public final String indexDir = getKeyValue("INDEX_ROOT");

Also see:

Subscribe in reader