On Feb 7, 2008 8:35 AM, Vidar Ramdal <[EMAIL PROTECTED]> wrote:

> ...What I have envisioned, is creating servlets that extends e.g.
> SlingAllMethodsServlet. Our servlet will examine the request, pass the
> request on to Sling in some cases, or pass it on to our own code in
> other cases. Is this strategy at all possible and advisable?...

Right now it's the other way around: based on configuration properties
of your Servlet, like in my previous example:

 *  @scr.property
 *      name="sling.servlet.resourceTypes"
 *      value="scr/test"

Sling selects a suitable Servlet from the list of all registered ones.

The possible configuration properties are listed at [1] - I think that
page is up to date, but I'm not sure if all combinations currently
work and/or are included in our automated tests.

We did talk about inverting the mechanism, i.e. allowing Servlets to
decide by themselves if they want to handle the request or not. This
is not implemented nor designed at the moment, but if really needed
that shouldn't be too hard to implement - but it's probably in the
YAGNI category at the moment.

-Bertrand

[1] http://incubator.apache.org/sling/site/servlet-resolution.html

Reply via email to