CacheFilter needs to come before the CompressingFilter in the web.xml because otherwise adding  a Content-Encoding: gzip header for gzip compressed images, css or javascript files will fail silently bec ause that type of header is excluded in CompressingFilter.