Since its a properties file sitting in the class heirarchy, your have 2 ways: 1) ResourceBundle 2) Use ServletContext.getResourceAsStream(...) and Properties.load(...)
-Tim
Gregory Vandenbroucke wrote:
Hi all,
I'm using some third party API, which uses a property file. That file should be accessed under a specific path /com/thirdparty/resources/ (exploded jar). My WEB-INF looks like this:
WEB-INF/web.xml WEB-INF/classes/com/mycompany/myservlets/*.class (my servlets) WEB-INF/classes/com/thirdparty/resources/thirdparty.properties WEB-INF/classes/myConfig.properties
WEB-INF/lib/thirdparty.jar WEB-INF/lib/myLib.jar
I servlets have no trouble accessing myConfig.properties using a class from myLib.jar. But my third party library (thirdparty.jar) is unable to locate its property file (thirdparty.properties).
I tried to declare something in my web.xml (using <init-param>) but that didn't work out. I didn't find any useful documentation on this matter.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
