Reputation: 1471
I have a Tomcat running with several .war
files but I only want to enable gzip compression for some of them (all running on Spring). How can I specify gzip HTTP compression per war?
Upvotes: 0
Views: 466
Reputation: 29927
You have a few options. The recommended one is to do this in the webserver that you have in front of your apps (if you don't have one you'll probably learn quite soon why you need one).
Another approach, but not as good as the one above, is to use a different Connector, which means that those apps will be listening on a different port.
And the last and worse approach is to add a filter that does the GZIP compression, as explained here.
Upvotes: 1