Easy way to get path of sling.home
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
Re: Easy way to get path of sling.home
On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller mike...@mysign.ch 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
AW: Easy way to get path of sling.home
Hi Alex On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller mike...@mysign.ch 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
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
Re: AW: Easy way to get path of sling.home
Hi Mike, Mike Müller schrieb: Hi Alex On Wed, Apr 22, 2009 at 5:25 PM, Mike Müller mike...@mysign.ch 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
AW: AW: Easy way to get path of sling.home
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