1 second guide – enabling gzip compression in Apache Tomcat

This is one of those note-to-self posts.

Add the following attributes to the <Connector> in Tomcat’s server.xml to enable gzip compression of responses:

   compression="on" compressionMinSize="2048"
   compressableMimeType="text/html,text/xml,text/csv,text/css,text/javascript"

Done.

Related posts:

  1. ResourceTransformFilter – DataUris, LessCSS, Javascript and CSS Compression Made Easy!
  2. Automatic Javascript and CSS Compression For Java Webapps
  3. 5 Minute Guide to Clustering – Java Web Apps in Tomcat
  4. Simple Guide To Sub-reports in JasperReports / iReport
  5. Add Package (or Class) Filtering To Your Findbugs Ant Task

This entry was posted in Java, Software Engineering and tagged Java, tips, tomcat. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>