According to p. 735 of Head First,
Which about filters are true?
A. Filters may be used to create request or response wrappers.
...
From the examples of the book, I think it is the developer who creates a wrapper for the request/response and pass the wrapper object to the filter chain's doFilter method, like the example on p.720:
The filter itself does not create the wrapper.