Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"Filters may be used to create request or response wrappers"  RSS feed

 
Ranch Hand
Posts: 1684
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 3097
255
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The filter itself does not create the wrapper.


True, but that is not how I interpret that sentence. I interpreted it like this: if you want to work with request or response wrappers then a filter is a appropriate place to create them.
 
What a show! What atmosphere! What fun! What a tiny ad!
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!