I'm a little confused by the answer to a mock exam question in the K&B book on page 735 question 5.
The question is ...
"Filters may be used to create request or response wrappers?" ... I would think this is false since the API provides classes like HttpServletRequestWrapper etc. ... that 'wrap' (aka .. 'decorator' pattern) Servlet requests and responses. Of course one can write their ones own implementation of the ServletRequest and ServletResponse interfaces. Yet in either case theses wrappers are not Filters! And implementations of the Filter interface are not wrappers!
Am I missing something here? .. or .. Is the book incorrect?
The question is ...
"Filters may be used to create request or response wrappers?" ... I would think this is false since the API provides classes like HttpServletRequestWrapper etc. ... that 'wrap' (aka .. 'decorator' pattern) Servlet requests and responses. Of course one can write their ones own implementation of the ServletRequest and ServletResponse interfaces. Yet in either case theses wrappers are not Filters! And implementations of the Filter interface are not wrappers!
Am I missing something here? .. or .. Is the book incorrect?