I am having two basic problems with HFSJ Filter's chapter:
1) In HFSJ in page 715 it says we can not just modify the response after call to chain.doFilter() as by when the execution pointer returns the request already have been posted back to the client as it do not wait for the filter method to finish. But in page 723 it is flushing the custom output stream after the call to chain.doFilter() - please explain where I am making a mistake?
2) In page 735 question no. 5 it says
"Filters may be used to create request or response wrappers" - Correct
"Wrappers may be used to create request or response filters." - Incorrect
Why??
i can see the 2nd statement is absurd but why the first one is correct!?
Thanks in advance.