This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes unable to get gzip working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to get gzip working" Watch "unable to get gzip working" New topic
Author

unable to get gzip working

J. Kevin Robbins
Ranch Hand

Joined: Dec 16, 2010
Posts: 632
    
    7

I got it working on my local copy of Tomcat by editing the server.xml like so:

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443"
compression="on" compressionMinSize="1024"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>

But when I make the same change to my test server, gzip does not get enabled. I'm using YSlow and Firebug to view the requests. Both servers are Tomcat 6.0.xx, the local one (working) is running on Windows 7, the test server is running on RHEL4. There are no errors in the log. The responses from the server have the expected content-type, (i.e. text/html).

Multiple sources on the net say that this is the only configuration required, but it sure looks like I've missed something. Any ideas?


"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to get gzip working
 
Similar Threads
problem with apache 2 + mod_deflate
Hibernate & Row Locks Problem
Base64 encoded file as POST request not working correctly.
How to comprese HTTP response
Question: How do you send a JSP page as compressed GZIP encoding?