tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Problem finding properties file in WEB-INF/classes/someSubFolder
Date Fri, 14 Nov 2003 11:55:33 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message