-
15. Re: GZip compression for connector in JBoss 7.0.x
maslov_eugine Nov 28, 2012 7:03 AM (in response to cmay4)Guys, could someone tell me what i am doing wrong:
1) I downloaded JBoss 7.1.1 Final from http://www.jboss.org/jbossas/downloads/
2) I added system properties
<system-properties>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="on"/>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/javascript,text/css,text/html,text/xml,text/json"/>
</system-properties>
inside standalone.xml
3) Started JBoss and deployed simple HelloWorld war there.
4) Opened FireFox and checked in YSlow compression:
Still no luck.
Thank you!
-
16. Re: GZip compression for connector in JBoss 7.0.x
aogier Jan 2, 2013 5:46 AM (in response to maslov_eugine)Same here with JBoss 7.1.1.Final, those system properties seem useless...
So I added an Apache HTTPD in front with mod_defalte and that config :
{noformat}
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/json
SetOutputFilter DEFLATE
{noformat}
And that has worked.
-
17. Re: GZip compression for connector in JBoss 7.0.x
natalia_s Mar 6, 2013 7:45 AM (in response to aogier)Hi, can you tell me in what file did you add these settings that made gzip compression enabled?
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/json
SetOutputFilter DEFLATE
So far I installed Webutils package to do the fitering, but Yslow still says that nothing is compressed.
Tnx!
-
18. Re: GZip compression for connector in JBoss 7.0.x
maslov_eugine Mar 6, 2013 10:19 AM (in response to natalia_s)I added next configuration to my web.xml:
<filter> <filter-name>compressionFilter</filter-name> <filter-class>com.googlecode.webutilities.filters.CompressionFilter</filter-class> <init-param> <param-name>compressionThreshold</param-name> <param-value>1024</param-value> </init-param> <init-param> <param-name>ignoreURLPattern </param-name> <param-value>.*xhtml.+</param-value> </init-param> <init-param> <param-name>ignoreMimes</param-name> <param-value>images/*|video/*|multipart/x-gzip</param-value> </init-param> </filter> <filter-mapping> <filter-name>compressionFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
and removed all JBoss settings for compression.
-
19. Re: GZip compression for connector in JBoss 7.0.x
natalia_s Mar 6, 2013 10:55 AM (in response to maslov_eugine)Eugine,
Thanks for your response. I checked my pages with YSlow after doing what you described, and I still don't see GZip compressing anything. Did you make it work with these settings? I am currently using JBOSS 7.1.2.
-
20. Re: GZip compression for connector in JBoss 7.0.x
maslov_eugine Mar 6, 2013 11:07 AM (in response to natalia_s)Yes, it works for me.
You can try to find more information on the webutilities page: https://code.google.com/p/webutilities/wiki/CompressionFilter.
Also you can try to use acceptURLPattern parameter to compress some concrete type of content to check.
Don't forget to add webutilities package to your dependencies