I am trying read the context path of a properties file from my application,
properties.load(this.getClass().getResourceAsStream(path));
import java.util.Properties;
public class test1 {
public String getValues()
{
PropertiesFileReader fileReader = new PropertiesFileReader();
Properties prop = fileReader.getProp("/messages/AttachFile.properties");
String out = prop.getProperty("FILE_NAME");
return out;
}
}
This works when the properties file is under WEB-INF -> classes -> messages -> myfile
but when i move this file to some other folder like WEB-INF -> messages -> myfile
it doesn't seem to get the path...
EDIT: I am not using servlets...