private void addGzipFilter ( ) { FilterMapping filterMapping = new FilterMapping ( ) ; filterMapping . setFilterName ( "gzip-filter" ) ; filterMapping . setPathSpec ( "/*" ) ; FilterHolder filterHolder = new FilterHolder ( new GzipServletFilter ( ) ) ; filterHolder . setName ( "gzip-filter" ) ; servletHandler . addFilter ( filterHolder , filterMapping ) ; }
Adds gzip filter for automatic response messages compressing .