Hi,

Alexander Klimetschek schrieb:
On Fri, Aug 15, 2008 at 3:54 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
Just a quick question: Why don't you set your resource type to be my/foobar
or even my:foobar ?

So you are at

 /libs/my/foobar
 /libs/my/type

Because the namespace prefix "my" is a very generic one (it is "cq"
;-)), but the "myapp" stuff is much more specific. I should have
better named the example "mylib", since I am in the /lib folder, which
gets typically more oriented towards smaller library parts than entire
applications. These smaller parts are more fine-granular than the
namespace, so it unfortunately doesn't fit.

Hmm, ok. Then I have to say, that out of the box, we cannot fullfill your request. The reason for this is, that servlet resolution only considers the resource type, whereas the resource type is iteself (for node based resources) taken from the sling:resourceType property or the primary node type.

There is however a service interface, where you might hook into, which allows finer control over the resource type resolution for JCR based resources: o.a.s.jcr.resource.JcrResourceTypeProvider.

You can register such a service, which is called by the JCR based resource if the sling:resourceType property is not set but before falling back to the primary node type. In such a service, you might map the primary node type to something different and get where you want.

Regards
Felix

Reply via email to