Good question. Have a look at the example of the @SlingServlet annotation which can take in a paths property inside it (e.g. http://blogs.adobe.com/aaa/2012/09/cq-tips-and-tricks-1-how-to-define-a-slingservlet-cq5-5-5-6.html )
However, it doesn't support placeholders. So what you may be able to do is to put the initial part of the path , say /customers/ and then do the processing after that. The other option is to write your own ResourceProvider which would handle the /customers/ prefix and then would decide which handler to delegate it to based on the rest of the URL structure. In the default jcr based resource resolution, the other option could be that your JCR node hierarchy is created as you showed in the URL. /content/ /customers/ On Wed, Mar 27, 2013 at 5:37 PM, Fabian Christ <[email protected] > wrote: > Hi, > > in current REST API framework approaches you can specify a path to a > resource with placeholders and use the concrete values of those in > your code, like this > > @Path(/customers/{customerid}/bills/{billid}/amount) > > Is something similar possible in Sling? I understand the concept of > node types and resource types. I have also seen the example of > path-based-rtp (for resource type processing?). But I could not find > an example for the situation above. > > Best, > - Fabian > > -- > Fabian > http://twitter.com/fctwitt >
