Good to hear. To ease your development setup the FileSystem resource
provider should do the trick.

Regards
Julian


On Thu, May 12, 2011 at 1:08 PM, sam lee <[email protected]> wrote:
> Thanks.
>
> I just did not want to put static files in the repository. It was difficult
> to synchronize files on our VCS and the repository. Normal workflow was,
> edit javascript and css files. And, then push them to the repository to see
> the change. If things work, commit to VCS.
>
> I could have used WebDAV mount. I was too lazy to mount sling WebDAV to
> existing directory and see what happens.
>
>  Static files will be served from CDN eventually. So, I'm not concerned with
> performance.
>
>
>
> On Thu, May 12, 2011 at 6:30 AM, Julian Sedding <[email protected]> wrote:
>
>> Hi Sam
>>
>> Why would you want to do this? If it's for performance reasons, did
>> you measure if there is actually a problem?
>>
>> If you request the static resource from Sling (and it is backed by a
>> JCR Node), it is just spooled out to the client. In case of binaries,
>> they would typically be served out of JackRabbit's DataStore and
>> therefore be served from the filesystem already. So all you could get
>> rid of is the Sling overhead, which should be minimal.
>>
>> Alternatively, it is possible to install the FileSystem Provider[0]
>> bundle, which is available on the Downloads page[1]. This allows you
>> to serve resources from the file system, but is still handled by Sling
>> and thus is ultimately served by the SlingMainServlet.
>>
>> Regards
>> Julian
>>
>> [0]
>> http://sling.apache.org/site/accessing-filesystem-resources-extensionsfsresource.html
>> [1] http://sling.apache.org/site/downloads.cgi#Downloads-SlingComponents
>>
>>
>>
>> On Thu, May 12, 2011 at 12:07 PM, sam lee <[email protected]> wrote:
>> > Hey,
>> >
>> > Is there a way to serve static files from filesystem (not repository)?
>> >
>> > For example,
>> >
>> > GET /static/js/jquery.js
>> >
>> > will be served from /var/www/media/js/jquery.js   of filesystem, not
>> > repository.
>> >
>> > (/static/*  is served from /var/www/media/*)
>> >
>>
>

Reply via email to