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 Loading
Date Thu, 20 Jul 2000 16:48:32 GMT
Hi,

I'm going nuts over Tomcat here... Do any of you with experience with 
Tomcat know why I can't use getResourceAsStream(). I use the following

<snip>

InputStream is=getClass().getResourceAsStream("/app.prop")
Properties prop =new Properties();
try{
prop.load(is);
} 
catch (Exception e){
System.out.println("Error:" + e+getMessage());
}

</snip>

to load propertyfiles from the classpath. 
This works 100% when using LiteWebServer (http://www.gefionsoftware.com),
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)
 is broken, as usual :( )
Any ideas?

TIA
Regards
Johan D


Mime
View raw message