AW: AW: Easy way to get path of sling.home

2009-04-22 Thread Mike Müller
> Have you looked at the filesystem resource provider ? This provides
> access to the OS filesystem through the Sling
> ResourceResolver. Carsten
> also wrote an interesting blog about this [1]
>
> Regards
> Felix
>
> [1] http://www.osoco.org/blog/?p=69

Thank you Felix, very interesting feature.

best regards
mike


Re: AW: Easy way to get path of sling.home

2009-04-22 Thread Felix Meschberger
Hi Mike,

Mike Müller schrieb:
> Hi Alex
> 
>> On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller
>>  wrote:
>>> Is there an easy way to get the absolute path to the
>> sling.home directory in a bundle or servlet?
>>> (sling launched as standalone app, not in a servlet container)
>> Sorry if I cannot answer your question, but why do you want to access
>> the filesystem if you have a JCR? :-)
> 
> Good question: What I am trying to do is integrating a bridge (bundle) for
> existing applications to run in Sling. These legacy apps use the file system.
> I do not want to change all that legacy stuff to use the JCR instead of the
> file system.

Have you looked at the filesystem resource provider ? This provides
access to the OS filesystem through the Sling ResourceResolver. Carsten
also wrote an interesting blog about this [1]

Regards
Felix

[1] http://www.osoco.org/blog/?p=69

> 
> best regards
> mike
> 



Re: Easy way to get path of sling.home

2009-04-22 Thread Felix Meschberger
Hi,

Mike Müller schrieb:
> Hi
> 
> Is there an easy way to get the absolute path to the sling.home directory in 
> a bundle or servlet?
> (sling launched as standalone app, not in a servlet container)

The sling.home is available as an absolute path as a framework property
through the BundleContext.getProperty method:

String home = bundleContext.getProperty("sling.home");


Regards
Felix

> 
> best regards
> mike
> 



AW: Easy way to get path of sling.home

2009-04-22 Thread Mike Müller
Hi Alex

> On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller
>  wrote:
> > Is there an easy way to get the absolute path to the
> sling.home directory in a bundle or servlet?
> > (sling launched as standalone app, not in a servlet container)
>
> Sorry if I cannot answer your question, but why do you want to access
> the filesystem if you have a JCR? :-)

Good question: What I am trying to do is integrating a bridge (bundle) for
existing applications to run in Sling. These legacy apps use the file system.
I do not want to change all that legacy stuff to use the JCR instead of the
file system.

best regards
mike


Re: Easy way to get path of sling.home

2009-04-22 Thread Alexander Klimetschek
On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller  wrote:
> Is there an easy way to get the absolute path to the sling.home directory in 
> a bundle or servlet?
> (sling launched as standalone app, not in a servlet container)

Sorry if I cannot answer your question, but why do you want to access
the filesystem if you have a JCR? :-)

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com


Easy way to get path of sling.home

2009-04-22 Thread Mike Müller
Hi

Is there an easy way to get the absolute path to the sling.home directory in a 
bundle or servlet?
(sling launched as standalone app, not in a servlet container)

best regards
mike