views:

410

answers:

2

I'm new to using Tomcat so perhaps I'm missing something. In the server.xml it looks as though it is possible to enable GZip compression for HTTP Responses from the server to the client. However in my application, there are large chunks of XML data being sent from the client to the server. Is there a way to enable GZip compression in tomcat so that my client sends the data compressed and it is automatically decompressed on the server side? Thanks.

+1  A: 

Perhaps this 2Way HTTP Compression Servlet Filter would be helpful?

Jonathan Feinberg
I saw that when doing my research. So is adding a servlet filter the appropriate way to go when using Tomcat? I am surprised that there isn't some native support in Tomcat for compressing HTTP requests. Especially with web-services where the client can be sending a large amount of data.
Shayan