cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar Adobati" <>
Subject Loading a configuration file from a jar
Date Thu, 19 Oct 2006 13:43:55 GMT
Good Morning,

  I have developed a jar file and I need to load some configuration
parameters from a .properties file placed outside of the jar itself.

The jar file is under $cocoon/WEB-INF/lib directory and the
.properties file too.
Now, the problem is that my own class (that extends the
java.util.Properties class) can't locate the properties file.
Here is the code I'm actually using:

public ConfigUtility(){
	File configFile = new File("/");	
	  configURL = configFile.toURL();
	}catch (Exception ex){
        //do some other useful stuff

I'm running cocoon 2.1.18 with tomcat 5.5.x and JDK 1.5

Thanks for your help :)

Omar Adobati

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message