On Wed, Jul 21, 2010 at 09:44, Felix Meschberger <[email protected]> wrote: > Please remember my other proposal: Separate SlingMainServlet > functionality from the SlingServlet service implementation. The > SlingServlet.process method will take SlingHttpServletRequest/Response > objects, which can (but are not required to be) built with the builder > helpers.
I think it would work if this SlingServlet interface just gets HttpServlet* objects, and not the Sling* ones. Internally, just as it already happens, Sling would wrap them accordingly. The addHeaders() example by Bertrand would work, since it is passed through to the original HttpServlet* object anyway. The Sling* request/response objects are only there for "internal" use by servlets that are aware that they run inside Sling. But for starting a fresh (background) request, the HttpServlet* interfaces are the lowest common denominator... and there is nothing from the Sling* interfaces that they need, right? To set selectors, extensions, etc., they can simply set the request URI accordingly. For the case where an existing request/response pair is used inside Sling, there is the RequestDispatcher plus its options to overwrite certain Sling specific stuff. Regards, Alex -- Alexander Klimetschek [email protected]
