title: How can I read file from classes directory in my WAR?
body: <p>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.</p>
  
  <pre><code>InputStream input = servletContext.getClass().getClassLoader().getResourceAsStream("my_filename.txt");
  </code></pre>