Click here to Skip to main content
13,045,379 members (120,904 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Everyone,
I'm facing some issue in configuring compression on tomcat7, scenario is that i'm working on client site where i've to turn on the compression on server on tomcat7. so what i've found the way to do this is to modify ...\tomcat7.0\conf\server.xml file and add some line to enable the compression.

<Connector port="80" protocol="HTTP/1.1"
		nocompressionUserAgents="gozilla, traviata"
	compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,text/json,application/x-javascript,application/javascript,application/json" />

but unfortunately its not working and when i open application in chrome and check for 'Content-Encoding:gzip' then also its not there. while interesting thing is that using same installers i've installed tomcat7 on my local machine with windows7 and compression is working fine on it. but not on client system that has Windows Server 2008 R2.

i'me also searching on Google for any solution or clue but found only two things on every site 1) how to configure for compression which is the same on all sites, 2) if not working then clear browser cache. could not found any other solution yet.

so any help from your side that its not working on Client PC but working fine on my local one.
Posted 27-May-13 2:26am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

First thing to check ... So you've installed tomcat on your local machine ... have you installed it on the client machine? Make sure that it's on there - enabling the compression and installing the tomcat server are not the same thing.

If you still have issues then post a question to the tomcat mailing list[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i Found the point that stopping compression when im accessing application from users PC (not from inside the application server). the issue was that browser has proxy configured so tomcat compression was not working through proxy.

i found this by testing the compression directly on server and also by accessing the application through a system that is connected to the server without proxy. so then i've told the IT guys to add exception for this URL in proxy settings rules and that solve me problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100