axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VF" ...@imh.cz>
Subject RE: file loading from aar
Date Thu, 12 Oct 2006 12:48:15 GMT
Thank you,it s ok:)

I used this:

getClass().getClassLoader().getResourceAsStream("myResource");

            Vladi


-----Original Message-----
From: Punnoose, Roshan [mailto:punnooser@bah-systems.com] 
Sent: Thursday, October 12, 2006 2:13 PM
To: axis-user@ws.apache.org
Subject: RE: file loading from aar

I'm using Axis2, and when I need to get to my files I usually have to use
the AxisService.getClassLoader() classLoader.

Maybe:

prop.load(AxisService.getClassLoader().getResourceAsStream("props.ini"))


-----Original Message-----
From: VF [mailto:vf@imh.cz]
Sent: Thu 10/12/2006 3:32 AM
To: axis-user@ws.apache.org
Subject: file loading from aar
 
Hi,how can I correctly load ini file for my properties object in web
service? I have my code in skeleton implementation:


....

try {
            prop.load(new FileInputStream("props.ini"));
        }
        catch (Exception e) {
....


And this file should by next to my aar file. Example:

c:\Program Files\Tomcat55\webapps\axis2\WEB-INF\services\fileservice.aar
c:\Program Files\Tomcat55\webapps\axis2\WEB-INF\services\props.ini


I need relative path. Thank you for response.


          Vladi



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




---------------------------------------------------------------------
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