Hello everyone, I have a file xyz.txt that is specific to my web application which needs to be located by my web application, and I wish to find that resource via getClass().ClassLoader().getResource("xyz.txt") at runtime. The xyz.txt file has no relation to any particular Java class in our application. This resource is used internally by the application and should not be served directly by the container to inbound HTTP requests, therefore I have it located in the WEB-INF/properties directory of my web app deployment. However, the getResource("xyz.txt") method returns null, even though my xyz.txt file is certainly where it is expected to be found.
Where should I place this file ideally, and given that file exists in that location, what is the parameter value I need to pass to getResource() so it returns a non-null value? Thanks, Doug