Compression wrapper code

We looked at the Compression filter; now let’s take a look at the wrapper it uses. This is one of the most complicated topics in all of servlet-dom, so don’t panic if you don’t grok it the first time.

This response wrapper decorates the original response object by adding a compression decorator on the original servlet output stream.

image with no caption
image with no caption

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.