you can do this by:
file : standalone.xml (JBoss AS 7+ )
Position : right after
<extensions>
</extensions>
<system-properties>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="on"/>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/javascript,text/css,text/html,text/xml,text/json"/> <!-- add other content types you want to gzip -->
</system-properties>