2011/8/22 Bertrand Delacretaz <bdelacre...@apache.org>:
> Hi,
>
> I've been looking at SLING-2191 - it looks like if several
> OptingServlets have the exact same registration parameters, only one
> is actually used.
>
> In Reto's example there we have two servlets registered with
>
>    @Property(name="sling.servlet.resourceTypes", value={
>            "sling/servlet/default",
>            "sling/nonexisting"
>    }),
>    @Property(name="sling.servlet.methods", value={"POST","GET"})
>
> which differ only in the results of their OptingServlet.accepts method.
>
> This causes their ServletResourceProviders to have the same provider
> roots, am I correct to assume that this is what causes one of the
> servlets to mask the other?

Probably. But isn't this how other Sling servlets work - that if more
than one servlet is registered on the same path (/apps/...) only one
is invoked?

One workaround is to register a delegating OptingServlet, which holds
references to a set of other servlets, and invokes them in turn.

> If I'm correct, we might need to use a single ServletResourceProvider
> in such a case, and allow it to point to a set of OptingServlet.



-- 
Vidar S. Ramdal <vidar.ram...@webstep.no>
Webstep AS - http://www.webstep.no
Besøksadresse: Lilleakerveien 8, 0283 Oslo
Postadresse: Postboks 272 Lilleaker, 0216 Oslo

Reply via email to