Thanks,

but this isn't what I was looking for.
My code doesn't have to access a properties file.
It's a third party jar that needs to use a property file (for some
configuration stuff).
So my com.thirdparty.resources.thirdparty.properties (corresponding to ->
/com/thirdparty/resources/thirdparty.properties when exploded)
resource should be on the classpath. But the third party jar doesn't find it
on the classpath.
I suppose I have to configure something in the web.xml,
but until now nothing worked out.

Gregory.


-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: vendredi 14 novembre 2003 12:56
To: Tomcat Users List
Subject: Re: Problem finding properties file in
WEB-INF/classes/someSubFolder


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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to