Ilya Kasnacheev wrote (2008-03-11 11:35):
If the amount of data written before any forwards is deterministic there
is no problem. But if you cannot know beforehand how many forwards there
will be, or how much data there will be in each, it's risky.
or would increasing the
buffer (response.setBufferSize()) prevent the response from being
comitted until the "included forward" has been issued???
This way is too like hack. What if we'll fill this buffer prematurely anyway?
What I meant was whether there will under any circumstances be a forward
on the original - non-dispatched - request. (Such as displaying an error
page if an error occurs deep within the include hierarchy)
What about my anonymous wrapper? See reply to original post.
It may work if you are certain there will be no flushing to the client
before a forward().
Nope, there would be a lot of flushing before forward().
Because, forward() final destination isn't going to print page from scratch.
Instead it is going to print a fragment of page to be include()d.
After it will return, the rest of page() will be printed.
Also, there can be quite a few such (include() -> forward() -> forward() ->
resin-interest mailing list