sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <>
Subject Re: Binding to a resource Type
Date Wed, 03 Jun 2009 07:47:35 GMT

On 3 Jun 2009, at 06:32, Felix Meschberger wrote:

> Hi Ian,
> Ian Boston schrieb:
>> Should a servlet (with sling.servlet.resourceTypes value="x") bind to
>> JCR nodes where a parent node has a resourceType of x, or will it  
>> only
>> bind to JCR nodes where the node itself has the resourceType x ?
> I do not exactly understand what you mean by "bind to JCR nodes" ?

I mean, when I have servlet with
>   sling.servlet.resourceTypes = "x"

and send a request for node with a sling:resourceType=x the request  
will get routed to the servlet (assuming it can handle the request  
method, and selector)

If I send a request for a child node of the node with  
sling:resourceType=x, the request does not get routed to the servlet.

ie there is no resourceType inheritance by default in Sling.


> Registered servlets are not "bound to JCR nodes" but are added to the
> resource tree at predefined locations. For example a servlet  
> registered with
>   sling.servlet.resourceTypes = "x"
>   sling.servlet.extensions = "html"
> is added to the resource tree (by default) at
>   /apps/x/html.servlet
> This node (a leaf actually) in the resource tree is not backed by a  
> item and is only accessible through the resource resolver and only
> exists as long as the Servlet Resolver is active and the servlet is
> registered.
> Hope this helps.
> Regards
> Felix

View raw message