tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf B " <ambiese...@gmx.de>
Subject PROPERTIES files cannot be found?
Date Thu, 20 Nov 2003 22:22:42 GMT
Hi,

I have a properties file in my jar and put in under
Tomcat/webapps/opencms/WEB-INF/lib/mystuff.jar
Inside the jar the properties file is under /res/myconfig.properties.
OpenCms is a servlet in tomcat, depoyed and working. I think this question is
generally enough to be allowed to ask here in this forum.

In my code I try to access the java property file with the following code:


Properties p = new Properties();
try {
  p.load(new FileInputStream("res/myconfig.properties"));
} catch (IOException e) {e.printStackTrace();}


but it cannot be found. The java classes in this jar file are working fine.
What is wrong here? I expect that Tomcat does include all the jar files and
start the path from the root of each jar file. It should therefore find the
resource file...

Any ideas?

Ralf

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


---------------------------------------------------------------------
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