File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Filters" Watch "Filters" New topic
Author

Filters

Sophie Angela
Ranch Hand

Joined: Jul 17, 2006
Posts: 46
can filters be used to create request and response wrappers?

if so why?


can Wrappers be used to create filters?
Arunava Bhattacharya
Greenhorn

Joined: Dec 26, 2006
Posts: 15
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.


Thanks....<br />babun
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filters