tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: [Fwd: Re: Response not flushed before RD.forward() returns]
Date Sat, 21 Jan 2006 08:40:52 GMT

"Remy Maucherat" <> wrote in message
> Jan Luehe wrote:
>> Right, but flush does nothing once the response has been suspended.
>> In addition, consider the case where a request has been
>> forward-dispatched into a foreign context. If the target
>> servlet in the foreign context has set a status code on the response,
>> and the response is being suspended before returning from the
>> RD.forward(), the status code will be mapped to an error page
>> using the mappings of the *origin* context as the response
>> travels through the origin context's pipeline (and error valve)
>> on the way out.
>> The origin and target contexts may map the same status code to
>> different error pages, or the origin context may not even contain any
>> mapping for the given status code. In any case, I would find it
>> confusing for the origin context's mappings to be used, since
>> a RD.forward() is supposed to transfer control to the target.
>> I think it is cleaner for the response to be committed before
>> returning from RD.forward(), at the cost of not being mapped
>> to any error page. This is better than mapping the response to
>> a wrong error page. Or we could suspend the response when the
>> origin and target servlets share the same context, and commit it
>> when they reside in different contexts? Clearly, this would require
>> a spec clarification.
> -1

Yeah, it's pretty much a fatal flaw in the Catalina design.  It's currently 
impossible for Catalina to satisfy both the requirements for error-pages and 

> Rémy 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message