I am trying to access a .properties
file inside the web-inf folder in java, but I could not figure out how to do it.
If the file cannot be accessed, why is that?
Yet, I can access files from inside the package. The code for that is as follows:
Properties prop = new Properties();
InputStream in = ReadPropertyFile.class.getResourceAsStream("temp.properties");
prop.load(in);
System.out.println(prop.getProperty("asd"));
in.close();
So how to achieve this inside a java class?