Ian Boston  wrote
> 
> On 14 Jul 2010, at 16:10, Bertrand Delacretaz wrote:
> 
>> On Fri, Jan 8, 2010 at 5:31 PM, Ian Boston <[email protected]> wrote:
>>> ...We have been trying to implement a Batch method processor (ie a servlet 
>>> that performs multiple requests batching
>>> the responses up into a single request/response) in Sling.
>>>
>>> Normally with servlets this would require 
>>> requestDispacher.forward(wrappedRequest, wrappedResponse) but this doent
>>> work since Sling unwrapps all request back to a internal 
>>> SlingHttpServletRequestImpl object...
>>
>> I'm hitting the same problem in my work on SLING-550, created
>> https://issues.apache.org/jira/browse/SLING-1596 with a suggested
>> patch, also at http://codereview.appspot.com/1783044
>>
>> My solution is not perfect, to be clean I think we'd need to make
>> RequestData a first-class interface instead of an implementation
>> class, but my patch already decreases coupling a bit.
>>
>> Reviews welcome.
> 
> 
> I have a horrible feeling that if the unwrapped request is not a 
> SlingHttpServletRequestImpl then other parts of the engine misbehave, which 
> may have been the reason for enforcing that. It also allows anything to 
> create a new Request, including scripted components. That may not be 
> desirable.
> 
As already noted I'm not happy with this - this is internal stuff and we
should rather leave it the way it is.
Why not creating plain http servlet request objects and then going
through the sling main servlet?

Carsten
-- 
Carsten Ziegeler
[email protected]

Reply via email to