I have a web service (call it XYZ) which requires a .properties file.  I had
been putting it in
%CATALINA_HOME%\webapps\axis\services\XYZ, with the classes in
%CATALINA_HOME%\webapps\axis\services\WEB_INF\classes and using this to
open the properties file.

    File PFile = new File("webapps" + File.separator +
                          "axis" + File.separator +
                          "services" + File.separator +
                          "XYZ" + File.separator + "XYZ.properties");

    if (!PFile.exists())
      throw new CFException("No properties file: " +
PFile.getAbsolutePath());

This works, but there are two problems:

1) If Tomcat is run as a service, I have to put the properties file in
%WINSYSDIR%\webapps\axis\services\XYZ, instead.

2) I recently ditched the classes and put XYZ.jar into
%CATALINA_HOME%\webapps\axis\services\WEB_INF\lib.  Now, unless I hard-code
a path for the properties file (e.g., C:\XYZ.properties), the service can't
find it.

How is this issue normally handled?

Michael D. Spence
Mockingbird Data Systems, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to