In standard JBoss, gzip compression can be enabled for the HTTP connector, but not for AJP. An AJP connector is used between the Apache HTTP server and JBoss.
To enable gzip compression on the Apache HTTP server side, add the following lines to mod_jk.conf before </VirtualHost>:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript
This will allow you to use gzip compression for the given mime types using the mod_deflate output filter http://httpd.apache.org/docs/2.2/mod/mod_deflate.html .
Also uncomment the following line in httpd.conf to enable mod_deflate:
LoadModule deflate_module Modules / mod _deflate.so
source share