Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 1718
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
Posts: 3243
285
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!