O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a simple Wrapper to the design

Let’s enhance Rachel’s first pseudo-code by adding a wrapper.

Compression filter design, version 2 (pseudocode)

image with no caption
image with no caption

1 The filter passes the request object and a custom response object to the servlet.

2 Since we didn’t override any methods in the Wrapper, the output stream isn’t affected... yet.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required