I have seent the idea of using compression to demonstrate filters in several places (I think there is even some sample code that comes with
tomcat) and I agree that it is probably something that you would want to do on the server itself. Not only that, it does not seem to be a particularly good example as there is no obvious difference to see when the filter is working or not working on a typical home machine.
For this reason I came up with a demonstration of filtering that acts to filter out words sent via tht post method in an HTML form. The idea is that you might want to prevent spamming in a forum with V*agra ads. It also illustrates the idea of using the wrapper classes.
You can see the code at
http://www.examulator.com/moodle/mod/resource/view.php?id=427