views:

158

answers:

2

Hi,

Wondering if anyone has set up GZIP compression for Spring HttpInvoker requests using Tomcat, and what steps are necessary?

Also, any advice on whether it's actually worth it; is there much to be gained from trying to compress what are basically serialized Java objects, or do they not really reduce in size much?

Thanks,

Brian

A: 

If you can put Apache in front of Tomcat then you'd do it using Apache web server

redben
I think you misunderstood the question. Regardless, Tomcat itself just already supports GZIP out of the box.
BalusC
Thanks for the comment BalusC. Sure Apache is just one way of doing it. I like to put Apache in front of servlet container for numerous reasons among which GZipping responses. On apache it's configuration and no coding. I find it easier to maintain. But that's just me :)
redben
I don't think Apache config alone would work with Spring HttpInvoker request/responses
Brian
+1  A: 

Extend SimpleHttpInvokerRequestExecutor and override the I/O methods with GZIPInput/Output-Stream example

stacker
looks promising will give it a crack! I like the fact that's app-server independent too.
Brian
Works nicely - brings our 525,000 byte request down to just over 12,000. Cheers.
Brian