You have a couple of options with web applications. First of all you use the ClassLoader to load the resource, or you can load the resuorce relative to the web application root using the ServletContext.
Example 1 : Say you have a file called my.properties sitting in the WEB-INF/classes directory, you can use the following snippet to get an InputStream to that file.
Example 2 : Say you have a file called my.properties sitting underneath the WEB-INF directory.
In this case, you can load the file using the following snippet (assuming you have access to a ServletContext instance)
Hope that helps!
Simon