Joern,
I'm not sure how you are deploying your web service. However, if it is
in a webapp (like the axis2 webapp), then place the properties file in
the WEB-INF/classes directory and use the following code.
// Read properties file.
Properties properties = new Properties();
try
{
properties.load(this.getResourceAsStream("axis.properties"));
}
catch (IOException e)
{
logger.error("Cannot locate axis.properties file", e);
}
Steve Hall
[EMAIL PROTECTED] wrote:
Hello,
I have a problem with my properties class. After archiving my service
my database controller can't locate or read the properties data.
In the data are the settings for the database connection like treiber
, username url .
Where do I have to place the properties for the right reading and is
it possible to use a normal properties like this:
**
*private* *boolean* loadProperties() {
*boolean* data = *false*;
*try* {
/properties/.load(*new* FileInputStream(config));
data = *true*;
} *catch* (*final* FileNotFoundException e) {
System./out/.println("Config File konnte nicht gefunden weren oder
existiert nicht.");
data = *false*;
e.printStackTrace();
} *catch* (*final* IOException e) {
System./out/.println("Es ist ein Fehler beim Lesen der Config Datei
aufgetreten.");
data = *false*;
e.printStackTrace();
}
*return* data;
}// end of load Properties
I hope , that someone can help with this problem.
Best regards
Jörn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]