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