Beruflich Dokumente
Kultur Dokumente
Response Filter
1. Bu the problem is before the doFilter of the 1 st filter tries to compress the
servlet might send the output to the client.
2. So we need to control the output.
3. The solution : instead of passing the real response object pass a custom
response object whose output stream u control
c. These classes r a little different the the Listener adapter classes for
GUIs , they dont just provide an interface implementation they hold a
reference to the object of the same interface type to which they
delegate method calls.
d. Wrapper classes created by sun
i. ServletRequestWrapper
ii. HttpServletRequestWrapper
iii. ServletResponseWrapper
iv. HttpServletResponseWrapper
A full example