• Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters  RSS feed

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can filters be used to create request and response wrappers?

if so why?


can Wrappers be used to create filters?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes..filters can be used to make wrappers.This is because you might want to compress the response you are getting from a servlet and you can create your own custom response object and pass it as a parameter to the chain.doFilter(req,res) method.

For details of this please refer to HFSJ book.It has been explained beautifully there.Though you do not need to know it in detail.
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is phrasing it a bit strangely- filters are not used to create wrappers or vice versa. In a filter you'd create a wrapper if necessary (it's not required).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!