views:

247

answers:

2

How is gzip compression for Jboss 5.1.0 enabled?

Within the tomcat http connector right? I cant remember where this file is stored, server.xml?

+2  A: 

The file is under server.xml and you are correct in stating that you have to updated the http connector.

Following link is info for tomcat, but same applies to JBoss except location of server.xml file. I believe you need to update the server.xml under deploy\jbossweb.sar\

http://viralpatel.net/blogs/2008/11/enable-gzip-compression-in-tomcat.html

Waleed Al-Balooshi
Thats it, thanks.
tinny
+2  A: 

edit jboss\server\default\deploy\jbossweb.sar\server.xml

Edit this:

<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" 
           connectionTimeout="20000" redirectPort="8443" />

to be more like this:

<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" compression="on" 
compressableMimeType="text/html,text/xml,text/css,text/javascript, application/x-javascript,application/javascript" 
connectionTimeout="20000" redirectPort="8443" />
James Clarke