Here is some sample code for loading a properties file in the META-INF directory of a deployment file.
public Properties getPropAsResource(String name) throws Exception
{
InputStream is = getClass().getResourceAsStream("/META-INF/" + name);
if (is == null)
{
throw new Exception("Unable to locate resource: " + name);
}
Properties confProp = new Properties();
confProp.load(is);
return confProp;
}}}
Comments