Thank you Bertrand - this is what I was looking for!

Is my assumption correct that we will have to process the changes to the repository in the script when using this approach?

Regards,
Erik Buene


Bertrand Delacretaz wrote:
On Sat, Jun 14, 2008 at 8:52 PM, Erik Buene <[EMAIL PROTECTED]> wrote:
...How can I make an esp that handles the request when creating a new node?

Depends on how you create it, but using the "magic star" resource, a
script at at /apps/foo/POST.esp is executed if you do a POST to
content/foo/*, for example.

This works because a StarResource (see that class) is used for
requests where the path ends with a star, and the launchpad uses the
org.apache.sling.samples.pathbasedrtp.DefaultResourceTypeProvider to
extract the resource type from the path (content/foo -> foo), but only
for paths under /content (configured in the
DefaultResourceTypeProvider service).

.. and is it possible to do so for a specific resource type (or resource
type of parent node)?...

In this case the resource type is set by the parent path, but that
logic can be modified by implementing a different
JcrResourceTypeProvider service.

-Bertrand

Reply via email to