Click here to Skip to main content
15,889,723 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.

XML
<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

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[^]
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900