0

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?

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

1 Answers1

3

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
  • 8,479
  • 2
  • 18
  • 15
  • Should I add to deploy\jbossweb.sar\server.xml or to deployers\jbossweb.deployer\server.xml? – Volodymyr Bezuglyy May 13 '10 at 13:36
  • 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 – Volodymyr Bezuglyy May 13 '10 at 15:42
  • 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 May 13 '10 at 18:11