Hi Bertrand
Thanks for your answer
I created the following node:
{"title":"Demo","sling:resourceType":"application/xyz","jcr:createdBy":"admin","jcr:created":"Tue
Oct 29 2013 08:54:58 GMT+0100","jcr:primaryType":"sling:Folder"}
When I call it via the registered extension e.g. /content/xyz.do I can
verify that my servlet is called.
TIMER_START{ServletResolution}
TIMER_START{resolveServlet(JcrNodeResource, type=application/xyz,
superType=null, path=/content/xyz)}
TIMER_END{0,resolveServlet(JcrNodeResource, type=application/xyz,
superType=null, path=/content/xyz)} Using servlet
de.cloudsurfers.slinTIMER_END{0,ServletResolution} URI=/content/xyz.do
handled by Servlet=de.cloudsurfers.sling.renderer.DemoRenderer
But via /demoprovider/xyz.do it is always rendered via the
DefaultGetServlet.
2013/10/29 Bertrand Delacretaz <[email protected]>
>
> Hi,
>
> On Tue, Oct 29, 2013 at 1:12 PM, Bernd Winterstein
> <[email protected]> wrote:
> > ...A ResourceProvider with root "/demoprovider" delivers an instance
with
> > properties "sling:resourceType":"application/xyz and
> > "jcr:primaryType":"nt:unstructured"...
>
> > ...Now I implemented a sling render Servlet for "resourceTypes =
> > "application/xyz". But the request is always delegated to the
> > DefaultGetServlet....
>
> Did you try creating a JCR node with that resource type, to verify
> that your servlet is called?
>
> I suspect it's not, because apart from that your setup looks correct.
>
> You might want also to check /system/console/requests to see exactly
> what's happening.
>
> We have a simple example ResourceProvider at [1], you might want to
> try with that one and see what's different.
>
> -Bertrand
>
> [1]
https://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/resourceprovider/