About Design Patterns, study this document. About filters, you could try to make a filter chain, wrap the response using the ResponseWrapper, and see what it works. I don't think there's anything fancy about it.
Response wrappers (or even request wrappers for that matter) are not on the exam. If there's any mention of them at all, all you'd need to know about them is that you'd create them inside an Intercepting Filter. Pretty much what Christophe said.
If you run into any doubts/questions while studying the Peabody on Patterns document, please post them here and we'll be glad to help you out.
Ok, wrappers are in the objectives and they very well might be on the exam.
Even if you don't get a question on the exam about them, they're definitely worth learning. They're a huge part of what makes Filters so awesome. They're also a great way to get more familiar with the Decorator pattern.
Let's say I want to make my application unable find any Cookies in any request...
I can write a wrapper for the request and pass the wrapper along to the application through the FilterChain. My application will think that it's talking directly to the request object but it will actually be talking to a different object that implements the ServletRequest interface - my wrapper object!
The HttpServletRequestWrapper class I will extend is really cool. It has a default behavior for every method that just spits out whatever the original request object would return for that method. I only have to override the methods I want to behave differently. In this case, I want to override the getKookies* method because I want my application to believe that there aren't any cookies.
There's all kinds of cool things you can do with wrappers. Come up with some ideas of your own and try them out. You can even put a wrapper on the response object. My code should give you a good head start.
* change getKookies to use a 'C' - I had to use a 'K' to get around a limitation set by the JavaRanch forum software
A good workman is known by his tools.
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?