Actually I'm trying to point out the properties file in the Web-INF folder, which is when I'm actually I am using a servlet, but I have some common Java classes for which I need to point out the "relative" path and I can not find any way to do this.
Usually this is how I point to the file:
InputStream = getServletContext () GetResourceAsStream ("/ Web-ANF / PROP Properties");
As far as I know is the only way to do this Since you have a web application, so all object graphs can originate from the roots, where the serial contact in this article (maybe wrapped in some other classes) ServletContext is available (servlets, filters, listeners, etc.), so that you can pass ServletContext with the article from these values.
Comments
Post a Comment