Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Compression
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"
               connectionTimeout="20000"
               redirectPort="8443"
		compression="on"
		compressionMinSize="2048"
		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 3:26am
Rate this: bad
good
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 http://tomcat.apache.org/lists.html[^]
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 210
3 Afzaal Ahmad Zeeshan 204
4 CPallini 185
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2014
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