Thursday, March 29, 2012

How to Enable Gzip HTTP Compression in JBoss AS 7.1.1

JBoss AS 7.1.1 has finally returned the powerful Gzip HTTP Compression support (AS7-2991) that was missing since 7.0.0.

Edit standalone/configuration/standalone.xml and add <system-properties> after the </extensions> :

... <extension module="org.jboss.as.weld"/> </extensions> <system-properties> <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="on"/> </system-properties>

Proof :

$ curl --head --compressed http://localhost:9080/
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"2432-1331360042000"
Last-Modified: Sat, 10 Mar 2012 06:14:02 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
Date: Fri, 30 Mar 2012 00:40:36 GMT

If you're running your app on OpenShift, it doesn't hurt to enable this switch now. That way, when OpenShift upgrades to JBoss AS 7.1.1 or later, your app will get HTTP Compression automatically. :-)

Alternative: You can also enable it by adding to the server launch params :

-Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on

Enables HTTP compression on JBoss 7.1.1


To learn more about Java Web Development using Java EE 6, I highly recommend The Java EE 6 Tutorial: Basic Concepts (4th Edition) (Java Series) by Eric Jendrock, Ian Evans, Devika Gollapudi and Kim Haase.

21 comments:

amitperk said...

I am very pleased to find this site. I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post.
Thanks
grinding wheels

amitperk said...

Congratulations on having one of the most sophisticated blogs Ive come across in some time
! Its just incredible how much you can take away from something simply because of how
visually beautiful it is. You've put together a great blog space.
Thanks
rotogravure printing machine

amitperk said...

Fine information, many thanks to the author. It is puzzling to me now, but in general, the usefulness and importance is overwhelming. Very much thanks again and good luck!
Garage Tools

amitperk said...

Thanks for sharing this useful information! Hope that you will continue with the kind of stuff you are doing.
Deaerator system

amitperk said...

Nice post. I like the way you start and then conclude your thoughts. Thanks for this information .I really appreciate your work, keep it up
automatic packing machine

amitperk said...

Youre so cool! I dont suppose Ive learn anything like this before. So nice to find someone with some authentic thoughts on this subject. realy thanks for starting this up. this website is something that's needed on the web, somebody with a bit originality. helpful job for bringing something new to the web!
stamping

Ghostwriters said...

I read above content it is very informative

Anonymous said...

I have just enabled it for my applicatoin but it does not work :(

amitperk said...

You have share the nice post which is very use full for me . Thanking you for this valuable blog.

Bucket Elevators

amitperk said...

I have used your application and its working really good.

Thanks;
Shrink film

Roberthussy said...

Good news.This is a great post. I like this topic.This site has lots of advantage. I found many interesting things from this site. It helps me many away..So i want some information for sharing this side with some of my friend. Thanks

SEO Services

ravi said...

warm Greeting


These kind of post are always inspiring and I prefer to read quality content so
I happy to find many good point here in the post, writing is simply great, thank you for the blog.






rotogravure printing machines

Anonymous said...

Thanks for this read mate. Well, this is my first visit to your blog! But I admire the precious time and effort you put into it, especially into interesting articles you share here!
Søgemaskineoptimering

Seo said...

I’m happy to have found your very excellent article! I agree with some of your readers and will eagerly look forward to your coming updates. Just saying thanks will not just be adequate, for the superb lucidity in your writing. I will instantly grab your rss feed to stay privy of any updates. Very good work and much success in your business efforts.

Ambition said...

I am so glad to see this. Meat definitely needs to be cooked to a certain point. This is not good for you when it is not cooked to this point.

Prank Calls said...

Nice blog and nice post, The topic here i found is really effective.

Tina said...

Some posts really matters because they are valueable, I have found your post very valueable.

Filipe said...

It works to all responses (JSPs, JSs, CSSs...) except webservices responses. Any idea? Is it a normal behavior? Tanks in advance.

Cute Childrens said...

"I always like to read a quality content having accurate information regarding the subject and the same thing I found in this post. Nice work."

abhishek somani said...

nice ionfo

SEO Expert said...

Glad to read your post :). It is very informative!

Post a Comment

 
Copyright 2009 Spring vs Java EE Web Dev. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan