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 de...@pnb.com.ph on 2007/11/13 09:46:50 UTC

libraries and configuration files

Hi,

        I have a set of libraries and configuration files stored on a 
"lib" and "properties" directories respectively.   Where do i place these 
directories so that they would be available in my Web Service?


Regards,

Joseph

Re: libraries and configuration files

Posted by Amila Suriarachchi <am...@gmail.com>.
I think this is a java problem.
As I know if you want to access a file within any application server
you have to give a relative path from the
application servers bin folder or use the absolute paths.

The other option is to put that file to the class path and access
using the getResourceAsStream method.

thanks,
Amila.

On Nov 13, 2007 3:31 PM,  <de...@pnb.com.ph> wrote:
>
> Charitha,
>
>         Thank you for your swift response and for the references.   This
> works well with libraries.  How about for configuration files? Lets say my
> webservice reads a text file named "System.properties" inside a "properties"
> or "conf" directory.   Assuming that the web service needs to read something
> from System.properties through something like props.getProperty("AUTHOR");
> and return the corresponding value in the properties file such as
> AUTHOR=JOSEPH... where should i place this file so it would be readable only
> to my web service.   I've tried placing the properties folder inside
> CATALINA_HOME/ and things work fine...  The problem with this setting is, it
> could lead to configuration conflicts for other services.
>
>
> thanks,
>
> Joseph
>
>
>
>
>
>
>  Charitha Kankanamge <ch...@wso2.com>
>
> 11/13/2007 05:18 PM
>
> Please respond to
>  axis-user@ws.apache.org
>
>
> To axis-user@ws.apache.org
>
> cc
>
> Subject Re: libraries and configuration files
>
>
>
>
>
>
> Hi Joseph,
>  The library files can be included in the lib directory created in your
>  service archive. The service archive file structure is as follows.
>
>  Yourservice.aar
>     - META-INF
>             - services.xml
>     -lib (You can include your lib files here)
>     -org
>        -test
>           -Yourserviceimplementation.class
>
>  For more information on axis2 service archive,please check the following
>  urls.
>
>  http://wso2.org/library/2546
>  http://jaxmag.com/itr/online_artikel/psecom,id,757,nodeid,147.html
>
>  regards
>  Charitha
>
>
>  delapenajs@pnb.com.ph wrote:
>
>  >
>  > Hi,
>  >
>  >         I have a set of libraries and configuration files stored on a
>  > "lib" and "properties" directories respectively.   Where do i place
>  > these directories so that they would be available in my Web Service?
>  >
>  >
>  > Regards,
>  >
>  > Joseph
>
>
>
>  --
>  Charitha Kankanamge
>  WSO2 inc.
>  Flower Road, Colombo 07
>  +94 714268070
>
>  A bug in the hand is better than one as yet undetected
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

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


Re: libraries and configuration files

Posted by de...@pnb.com.ph.
delapenajs@pnb.com.ph 
11/13/2007 06:01 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: libraries and configuration files







Charitha, 

        Thank you for your swift response and for the references.   This 
works well with libraries.  How about for configuration files? Lets say my 
webservice reads a text file named "System.properties" inside a "
properties" or "conf" directory.   Assuming that the web service needs to 
read something from System.properties through something like 
props.getProperty("AUTHOR"); and return the corresponding value in the 
properties file such as AUTHOR=JOSEPH... where should i place this file so 
it would be readable only to my web service.   I've tried placing the 
properties folder inside CATALINA_HOME/ and things work fine...  The 
problem with this setting is, it could lead to configuration conflicts for 
other services. 


thanks, 

Joseph 





Charitha Kankanamge <ch...@wso2.com> 
11/13/2007 05:18 PM 

Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org 
cc

Subject
Re: libraries and configuration files








Hi Joseph,
The library files can be included in the lib directory created in your 
service archive. The service archive file structure is as follows.

Yourservice.aar
   - META-INF
           - services.xml
   -lib (You can include your lib files here)
   -org
      -test
         -Yourserviceimplementation.class

For more information on axis2 service archive,please check the following 
urls.

http://wso2.org/library/2546
http://jaxmag.com/itr/online_artikel/psecom,id,757,nodeid,147.html

regards
Charitha


delapenajs@pnb.com.ph wrote:

>
> Hi,
>
>         I have a set of libraries and configuration files stored on a 
> "lib" and "properties" directories respectively.   Where do i place 
> these directories so that they would be available in my Web Service?
>
>
> Regards,
>
> Joseph 



-- 
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



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



Re: libraries and configuration files

Posted by de...@pnb.com.ph.
Charitha,

        Thank you for your swift response and for the references.   This 
works well with libraries.  How about for configuration files? Lets say my 
webservice reads a text file named "System.properties" inside a "
properties" or "conf" directory.   Assuming that the web service needs to 
read something from System.properties through something like 
props.getProperty("AUTHOR"); and return the corresponding value in the 
properties file such as AUTHOR=JOSEPH... where should i place this file so 
it would be readable only to my web service.   I've tried placing the 
properties folder inside CATALINA_HOME/ and things work fine...  The 
problem with this setting is, it could lead to configuration conflicts for 
other services.


thanks,

Joseph






Charitha Kankanamge <ch...@wso2.com> 
11/13/2007 05:18 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: libraries and configuration files






Hi Joseph,
The library files can be included in the lib directory created in your 
service archive. The service archive file structure is as follows.

Yourservice.aar
    - META-INF
            - services.xml
    -lib (You can include your lib files here)
    -org
       -test
          -Yourserviceimplementation.class

For more information on axis2 service archive,please check the following 
urls.

http://wso2.org/library/2546
http://jaxmag.com/itr/online_artikel/psecom,id,757,nodeid,147.html

regards
Charitha


delapenajs@pnb.com.ph wrote:

>
> Hi,
>
>         I have a set of libraries and configuration files stored on a 
> "lib" and "properties" directories respectively.   Where do i place 
> these directories so that they would be available in my Web Service?
>
>
> Regards,
>
> Joseph 



-- 
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



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



Re: libraries and configuration files

Posted by Charitha Kankanamge <ch...@wso2.com>.
Hi Joseph,
The library files can be included in the lib directory created in your 
service archive. The service archive file structure is as follows.

Yourservice.aar
    - META-INF
            - services.xml
    -lib (You can include your lib files here)
    -org
       -test
          -Yourserviceimplementation.class

For more information on axis2 service archive,please check the following 
urls.

http://wso2.org/library/2546
http://jaxmag.com/itr/online_artikel/psecom,id,757,nodeid,147.html

regards
Charitha


delapenajs@pnb.com.ph wrote:

>
> Hi,
>
>         I have a set of libraries and configuration files stored on a 
> "lib" and "properties" directories respectively.   Where do i place 
> these directories so that they would be available in my Web Service?
>
>
> Regards,
>
> Joseph 



-- 
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



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