Hi Markus

You might get what you want by delegating your requests to the
ResourceResolver. I.e. you look up your node by UUID (or using search)
via the JCR API. Then you retrieve Node's path and call
resolver.getResource() using this path. Here you have a
JcrNodeResource, which you can return directly. In case you need the
resource's getPath() method to return the originally requested path,
you can wrap it before returning.

I used a similar approach for implementing SLING-1778[0], so you may
get inspiration from the attached patch.

Regards
Julian

[0] https://issues.apache.org/jira/browse/SLING-1778


On Thu, Feb 24, 2011 at 7:18 PM, Alexander Klimetschek
<[email protected]> wrote:
> On 24.02.11 17:15, "Markus Joschko" <[email protected]> wrote:
>>would prefer direct POSTs instead of having to deal with a redirect.
>
> But you can easily have internal redirects. I think writing a separate
> resource resolver (et. al.) for that seems overkill.
>
> The servlet would look up the real resource depending on ID/UUID/etc., and
> do a request dispatch (aka sling:include) on the new resource. The actual
> request, incl. POST method, parameters, etc., can be passed through.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> Developer // Adobe (Day) // Berlin - Basel
>
>
>
>
>

Reply via email to