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 Please help: Loading...
Date Fri, 21 Jul 2000 00:04:29 GMT
Hi,

I'm going nuts over Tomcat here... Do any of you with experience with 
Tomcat know why I cannot use getClass().getResourceAsStream() like:

InputStream is=getClass().getResourceAsStream("/app.prop")
Properties prop =new Properties();
try
{
prop.load(is);
} 

to load propertyfiles from the classpath. 
This works 100% when using LiteWebServer (using the exact same
JVM/servlet/classpath etc), but when moving to Tomcat, it seems 
to find the file, but it doesn't load... (Tomcat's FAQ-o-matic 
(http://jakarta.apache.org/jyve-faq/Turbine/screen/DisplayTopics/action/SetA
ll/project_id/2/faq_id/12)
gives no clue on this.)

Has it anything to do with Tomcat's classloader, or am I barking up the
wrong tree by assuming that?

Please help!

Any ideas?

TIA
Regards
Johan D 

Mime
View raw message