Shaun --

Consider dynamically loading the properties file from your classpath using 
a class loader.  This way, you can put the files anywhere you please and 
just include that directory in your classpath (or put them someplace 
already in your classpath).  If you need more specifics, let me know and 
I'd be happy to help...

justin

At 01:00 PM 10/7/2002, you wrote:
>I've got a servlet running under Tomcat and I need to read in the contents 
>of a properties file.  There will be different properties files for each 
>system specified using an init parameter.
>
>I'm having problems reading this property file at the moment in my java 
>class as the way I am doing it at the moment always looks where I started 
>Tomcat from i.e the /bin directory.  I can specify a full path to the file 
>but this is not very system independent and limits me to either Windows or 
>Unix.
>
>What I need is to specify the location of the file relative to the webapp 
>directory.  I have tried the url class but it doesn't seem to work, or 
>maybe it is working but looking in a different place to where my 
>properties file is.
>
>Can anyone suggest what I am doing wrong or provide any help on the use of 
>urls in Tomcat?
>
>Thanks
>
>
>Shaun
>


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

Reply via email to