-
1. Re: GZipCompression Filter & a4j
ckadam Aug 29, 2007 1:45 PM (in response to ckadam)Has anyone come across this problem ? Thanks.
-
2. Re: GZipCompression Filter & a4j
sergeysmirnov Aug 29, 2007 1:51 PM (in response to ckadam)This is a problem of filter, not ours. Default deflate compressor in Tomcat set the length right.
-
3. Re: GZipCompression Filter & a4j
ckadam Aug 29, 2007 2:05 PM (in response to ckadam)Sergey, Thanks for quick response.
Once I get rid of GZipFilter from web.xml, then I do not see this problem. But this may not be acceptable solution for us.
So I did debug the GZipCompression filter code, and found that GZipFilter is not changing the content-length header at all. So i am not really sure, who is setting the header value.
Is A4J, serving any of the resources in compressed format ?
Is there any recommended way for applying GZipCompression on JSF pages served using Jboss ? -
4. Re: GZipCompression Filter & a4j
alexsmirnov Aug 29, 2007 2:54 PM (in response to ckadam)Jboss AS bundled with a Apache Tomcat, where is compression built-in at the Connector level. See http://tomcat.apache.org/tomcat-6.0-doc/config/http.html , compression attribute description.
For a Jboss 4.2.1, edit $JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml -
5. Re: GZipCompression Filter & a4j
alexsmirnov Aug 29, 2007 2:59 PM (in response to ckadam)Content-Length response header is setted by RichFaces resource framework. It value is important for a properly resource caching ( most browsers don't cache objects for unknown length ).
-
6. Re: GZipCompression Filter & a4j
ckadam Aug 29, 2007 3:33 PM (in response to ckadam)Alex,
Thanks for response. I will look into those resources.
But I just wanted to bring up one more thing. On my page, I have modalPanel. So resources related to that are downloaded from these server as well. But I their case, content-length header is set correctly. So I am confused about, what so special about prototype.js resource.
e.g.
http://smdevdk12:8080/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.jsfResponse Headers Server Apache-Coyote/1.1 X-Powered-By Servlet 2.4; JBoss-4.0.3 (build: CVSTag=JBoss_4_0_3 date=200510042324)/Tomcat-5.5 Last-Modified Wed, 29 Aug 2007 18:23:42 GMT Cache-Control max-age=86400 Expires Thu, 30 Aug 2007 19:18:29 GMT Content-Encoding gzip Content-Type text/javascript Content-Length 10268 Date Wed, 29 Aug 2007 19:18:29 GMT Request Headers Host smdevdk12:8080 User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Referer http://smdevdk12:8080/config/showConfigurations.jsf Cookie JSESSIONID=B260D08B0315E0E534125702FBA3B539.localhost
-
7. Re: GZipCompression Filter & a4j
alexsmirnov Aug 29, 2007 6:43 PM (in response to ckadam)Different values for a content length provided by filter, framework itself set real value for a resources with known size.
Wich implementation of a GZipFilter is used ? -
8. Re: GZipCompression Filter & a4j
ckadam Aug 29, 2007 7:56 PM (in response to ckadam)Here is the reference : http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html