Search code examples
javatomcatweb-inf

How can I read files in my WEB-INF directory?


I'm running Java web application using Tomcat and I want to read a Properties file that's located in my WEB-INF directory. How can I get an InputStream to this Properties file so I can read it?


Solution

  • ServletContext.getResource/getResourceAsStream, IIRC.