I need to read text file from the classpath in Java WAR application. How can I read it as InputStream. File is located in /WEB-INF/classes/ folder, but when I use following code, it just returns null.
InputStream input = servletContext.getClass().getClassLoader().getResourceAsStream("my_filename.txt");