views:

501

answers:

1

I added following file
deployers\jbossweb.deployer\server.xml

<Connector compression="force" 
   compressionMinSize="512" 
   noCompressionUserAgents="gozilla, traviata" 
   compressableMimeType="text/html,text/xml,image/png,text/css,text/javascript">
</Connector>

But fiddler shows that jboss does not compress responses.

How to ensure that gzip compression in JBoss is turned on?
Is it possible to check it in jmx-console?

+3  A: 

Those settings need to be added to your existing HTTP connector element, i.e.:

  <Connector port="8080" address="${jboss.bind.address}"
     maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
     emptySessionPath="true"
     enableLookups="false" redirectPort="8443" acceptCount="100"
     connectionTimeout="20000" disableUploadTimeout="true"
  <!-- compression settings -->
     compression="force" 
     compressionMinSize="512" 
     noCompressionUserAgents="gozilla, traviata" 
     compressableMimeType="text/html,text/xml,image/png,text/css,text/javascript"
  />

Just adding them to a new <Connector> with no other settings won't do you any good.

pra
Should I add to deploy\jbossweb.sar\server.xml or to deployers\jbossweb.deployer\server.xml?
Vladimir Bezugliy
What is it CompressionMinSize?There is no such attribure in Connector element - http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Standard%20Implementation
Vladimir Bezugliy
These are attributes of the HTTP Connector, so they should go in the server.xml that defines your HTTP connector. I believe that's jbossweb.sar/server.xml but don't have a JBoss 5 install to verify now.About compressionMinSize, I took the compression settings verbatim from your question.
pra