axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Java Programmer" <jprogrami...@gmail.com>
Subject Reading properties files from AXIS
Date Wed, 29 Nov 2006 13:27:29 GMT
Hello,
I never do it before but I need to read properties file from an
application deployed as a service of AXIS. My first unsuccessful
attempt was:

Properties props = new Properties();
URL url = ClassLoader.getSystemResource("lucene.properties");
props.load(url.openStream());

System.out.println("Using index: " + props.getProperty("index.location"));
this.indexLocation = props.getProperty("index.location");

File lucene.properties I put in
${tomcatDir}/webapps/axis/WEB-INF/classes/lucene.properties, so I
thought I could read it as resource in non-web application using
classpath load, but it won't work - I think that in web servers must
be another way to read properties, maybe some dedicated for AXIS.
Maybe there is another option to provide variables to AXIS without
hardcoding them into Java classes you could share?

Best regards,
Adr

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message