You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tommaso Moroni <to...@realt.it> on 2008/12/13 16:15:39 UTC

Add external properties files to web service

Good day,

in a tomcat 5.5 installation I have a web application and an axis2 
webservices which should interact with each other. In order to do so, 
the web services must access some properties files which belong to the 
web application.

Is there a way to set the classpath of the web service to something 
similar to "C:/tomcat/webapps/myapp/WEB-INF/classes"?


Thank you in advance for your help
Tommaso Moroni

Re: Add external properties files to web service

Posted by Tommaso Moroni <to...@realt.it>.
The problem is that the other webapp can edit those properties file any 
time, and the web services should be able to see those modifications.
Is there a way to explicitly add paths to axis2 classpath?

Thanks
Tommaso


> Well if you put your property file inside a jar and put into the class
> path. Then at the run time you can access that from your service. I am
> not sure whether it will work if you just put the resource in the class
> path. Just try and see.
> 
> when you call getResourceAsStram() inside the service , it even work for
> class path properties as well.
> 
> Thank you!
> Deepal
>> Good day,
>>
>> in a tomcat 5.5 installation I have a web application and an axis2
>> webservices which should interact with each other. In order to do so,
>> the web services must access some properties files which belong to the
>> web application.
>>
>> Is there a way to set the classpath of the web service to something
>> similar to "C:/tomcat/webapps/myapp/WEB-INF/classes"?
>>
>>
>> Thank you in advance for your help
>> Tommaso Moroni
>>
> 
> 


Re: Add external properties files to web service

Posted by Deepal jayasinghe <de...@gmail.com>.
Well if you put your property file inside a jar and put into the class
path. Then at the run time you can access that from your service. I am
not sure whether it will work if you just put the resource in the class
path. Just try and see.

when you call getResourceAsStram() inside the service , it even work for
class path properties as well.

Thank you!
Deepal
> Good day,
>
> in a tomcat 5.5 installation I have a web application and an axis2
> webservices which should interact with each other. In order to do so,
> the web services must access some properties files which belong to the
> web application.
>
> Is there a way to set the classpath of the web service to something
> similar to "C:/tomcat/webapps/myapp/WEB-INF/classes"?
>
>
> Thank you in advance for your help
> Tommaso Moroni
>


-- 
Thank you!


http://blogs.deepal.org