В сообщении от 7 Март 2008 22:12 Mattias Jiderhamn написал(a):

> > page <- include (forward -> forward -> forward -> forward -> page)
> >
> > ... forward() in included servlet does not mean "instead of including
> > page" but "instead of included page"
> Ok, now I see where you're coming from.
> Do you have to issue the explicit .flush()
No I don't, but it eventually commits when enough data is printed to out.

> 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 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() -> 
print()) sessions.

> Using a buffered dispatch-response is safer. I think I have an
> implementation lying around on my other computer which I could post, but
> you should also be able to easily implement it yourself or find it on
> the net.
Yes, I understand, but for now I've just hacked isCommitted(). I'll know what 
to do if it'll stop working.

resin-interest mailing list

Reply via email to