"Remy Maucherat" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 forwards. > Rémy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
