I got question 5 on chapter 13 wrong after reading HFJS twice. I wonder why one of the correct answers is A. The statement of choice A is "Filter is used to create request and response wrappers.". Answers at the back of the chapter indicate that explanation can be found on page 51 of servlet specfication. I read that page but did not spot any sentence that states that fact.
I came across the same question and wondered the same thing.
Option A: "Filters may be used to create request or response wrappers." Option B: "Wrappers may be used to create request or response filters."
I picked option B (twice! >_< even though the answer is option A with the explanation "option B is incorrect because the terminology is reversed."
I picked option B because I thought a class that implements the Filter interface (the "request or response filter") uses/instantiates other wrapper classes in the doFilter() method, like the example on page 690. Doesn't that mean wrappers can be "used to create" request or response filters (option B)?
Now I read a few times more, I would choose option A if it means something like "I can use the Filter mechanism to pass wrappers for request/response objects to the servlet", hence filters can be "used to create" request or response wrappers.
Why is my first explanation incorrect?? Or am I just confused on the English here.....