1 16 package org.apache.myfaces; 17 18 import java.io.IOException ; 19 import java.util.Properties ; 20 21 22 28 public class TestConfig 29 { 30 32 private static final String TEST_PROP_FILE = "test.properties"; 33 private static final Properties _configProps = new Properties (); 34 35 static 36 { 37 try 38 { 39 _configProps.load( 40 Thread.currentThread().getContextClassLoader().getResourceAsStream(TEST_PROP_FILE)); 41 } 42 catch (IOException e) 43 { 44 throw new RuntimeException (e); 45 } 46 } 47 48 50 private TestConfig() 51 { 52 } 54 55 57 public static String getContextPath() 58 { 59 return _configProps.getProperty("servletContextPath"); 60 } 61 } 62 | Popular Tags |