Any suggestions to read properties file kept inside WEB-INF/resource using class loader. Something like :-
String fileName = "/WEB-INF/resource/my.properties";
InputStream input =MyClass.class.getClassLoader().getResourceAsStream(fileName);
properties = new Properties();
properties.load(input);
(Note- I don't want to read using servletcontext)
Find the error for above code:-
java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Unknown Source)
at java.util.Properties.load0(Unknown Source)
at java.util.Properties.load(Unknown Source)