Hi Sam

I think the RequestDispatcherOptions[0] might be what you're looking
for. It allows you to control certain aspects of re-dispatching
("forwarding" and "including") a request, including forcing a
different resource type. You could use this API in a servlet
registered for the "edit" selector, as you suggested.

Regards
Julian

[0] 
http://sling.apache.org/apidocs/sling5/org/apache/sling/api/request/RequestDispatcherOptions.html



On Thu, Mar 3, 2011 at 8:17 PM, sam lee <skyn...@gmail.com> wrote:
> Hey,
>
> I have a node:
>
> /content/page
>
> whose sling:resourceType = "/apps/foo/bar"
>
> So,  GET /content/page.html  will be handled by /apps/foo/bar/html.jsp
>
> I cannot modify sling:resourceType of /content/page.
>
> However, I would like GET /content/page.edit.html  to be handled by
> /apps/foo/bar2/edit.html.jsp
>
> Is this possible? I cannot modify /apps/foo/bar  and /content/page. But I
> want .edit.html to be handled by /apps/foo/bar2.
>
> Should I add a servlet with:
> sling.servlet.resourceTypes = sling/servlet/default
> sling.servlet.selectors = edit
>
> to capture all .edit.html  and somehow "call" /apps/foo/bar2/edit.html.jsp
> ?  (maybe a redirect?)
>

Reply via email to