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

Compression wrapper, helper class code

This helper class is a Decorator on the ServletOutputStream abstract class which delegates the real work of compressing the generated content using a standard GZIP output stream.

There is only one abstract method in the ServletOutputStream that this Decorator must implement: write(int). This is where all of the delegation magic occurs!

image with no caption

Request path

Filter Sequence

/Recipes/HopsReport.do

Filters: 1, 5

/Recipes/HopsList.do

Filters: 1, 5, 2

/Recipes/Modify/ModRecipes.do

Filters: 1, 5, 4

/HopsList.do

Filters:5

/Recipes/Add/AddRecipes.do

Filters:1, 3, 5

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