Hi,

Carbon HOME can be extracted as below also.

var server= require('carbon').server;
var carbon_home = server.home();


On Tue, Jul 30, 2013 at 5:47 PM, Kambiz Darabi <[email protected]>
wrote:

> Hi Nuwan,
>
> thank you for the quick help!
>
> Cheers
>
>
> Kambiz
>
> Nuwan Bandara <[email protected]> wrote:
> >
> > Hi Kambiz,
> >
> > you can do that by
> >
> > <%
> >
> > var process = require("process");
> > var f = new
> File('file:///'+process.getProperty('carbon.home')+'/repository/conf/test.
> > json');
> > f.open('r');
> > print(f.readAll());
> > %>
> >
> > Regards,
> > /Nuwan
> >
> > On Tue, Jul 30, 2013 at 3:29 PM, Kambiz Darabi
> > <[email protected]> wrote:
> >
> >     Hello,
> >
> >     in a jaggery app, I would like to load a json file from
> >     $CARBON_HOME/repository/conf/.
> >
> >     Looking into the code of the host objects, it looks like I either
> >     can
> >     load a file relative to the root of the jaggery app (i.e. relative
> >     to
> >     deployment/server/jaggeryapps/<myapp>/) or I need to specify a
> >     full
> >     path.
> >
> >     Is there another possibility which I am overlooking?
> >
> >     Thanks
> >
> >
> >     Kambiz Darabi
> >     _______________________________________________
> >     Dev mailing list
> >     [email protected]
> >     http://wso2.org/cgi-bin/mailman/listinfo/dev
> >
> > --
> > Thanks & Regards,
> >
> > Nuwan Bandara
> > Technical Lead; WSO2 Inc.
> > lean . enterprise . middleware | http://wso2.com
> > blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
> > 9629
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to