I am able to load a resource file (in my case log4j.xml) from the WEB-INF
file hierarchy.
>From what I've read, it could also be read from the AAR file, but I haven't
been able to get this to work.

I've tried a bunch of variations:

            MessageContext ctx = MessageContext.getCurrentMessageContext();
            DeploymentClassLoader dcl =
(DeploymentClassLoader)ctx.getAxisService().getClassLoader();
            URL configURL =  dcl.getResource("log4j.xml");

            or

            URL cfgURL = getClass().getClassLoader().getResource(
"log4j.xml");

            or

            URL myURL = org.apache.axis2.util.Loader.getResource(
"log4j.xml");

And to make sure I didn't just have the wrong path, I had several copies of
the file in the archive, like this:

myService.aar
- log4j.xml
- com
     + myco
           + service
          - myService.class
                    - log4j.xml
- lib
   - log4j.xml
- Meta-inf
      - Manifest.mf
      - service.xml
      - log4j.xml

Runtime environment is Tomcat  5.5.25, Axis2 1.3, Java 1.5.0_14

Any pointers on what I'm doing wrong would be very appreciated!

Thanks,
Steve Gruverman


_____________________________________________________
Steven Gruverman
IntelliCare, Inc.
207.253.2152
[EMAIL PROTECTED]
www.intellicare.com


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

Reply via email to