There are a few important points I'd like to make and they are listed with the more important points first. The first is you should almost always use some sort of caching and compression. The second point, is that it should be easy. And the third point is that it should be flexible.
About the first point. There are many ways to cache/compress content. Apache can do it, as can most any decent web server. You will certainly benefit no matter what you choose to use.
About the second point. The filters I presented are about as simple as they come, and they are 100% portable on any Java web app -- Apache backend or not. If you are doing Java web app development, you can configure these two filters once and simply reuse it for every other Java web app you ever make. All the deployment issues are transparent. I like this quite a lot because it means there are fewer configuration issues to worry about when setting up a new project, especially if you must use specific J2EE sever X or not-Apache solution Y.
About the final point. If you bundle cache/compression code in with your primary development environment you can do just about whatever you like. Modifying these two filters to do some sort of odd-ball functionality is near trivial for a Java developer, which hopefully you are if you are using them.... However, if I don't want my Apache (or other server) gzip support to compress content on the third day of the month, when requests are coming from my IP, and if I'm logged in to the web app as admin, it is near impossible to do.
So let me rehash. However you do this stuff is great. But, if you are working with Java web apps, something like these two filters is probably the ideal.