tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Dahlström <johan.dahlst...@RKS.SE>
Subject RE: Please help: Loading...
Date Fri, 21 Jul 2000 12:46:42 GMT
> -----Original Message-----
> From:	Edward W. Rouse []
> Sent:	Friday, July 21, 2000 2:04 PM
> To:
> Subject:	Re: Please help: Loading...
>prop.load(new FileInputStream("/app.prop"));
>you might need to play with the path to the prop file. I set the path using
>servlet contexts, getPath, etc...
>Bottom line is, if you can do something without using getClass(), do it.
>getClass seems to be one of those methods that doesn't always work exactly
>same way in all situations.

Thank you! 
I'll try that. I was hoping to get around fiddeling with paths... when
deploying at several sites, paths are always a pain in the xxx... I think
that the loading using getClass().getResourceAsStream()  depends on the
classloader that intially loaded the class, and since the Tomcat-team has
written their own classloder, this affects getClass().getResourceAsStream()
somehow... But then it might just be magic as well ;)

Johan D

View raw message