I was wondering if there was an easy way to serve GZipped content with Java Servlets. I already have the app up and running so the modifications needed should be too heavy.
I have access to the response object just at the end of the doPost/doGet method, so I'm looking for something like
response.setGzip(true);
It doesn't have to be that easy but it would be ideal.
Thanks a lot
Look at GzipOutputStream class. Something like this:
Then use writer like you do usually.