tomcat - gzip compression for jsf stuff -
i have jsf application (mojarra 2.1.8, primefaces 3.3) running on tomcat 6. while analyzing page in firebug google page-speed, realized optimize stuff gzip-compression.
compressing following resources gzip reduce transfer size 371,1kib (74% reduction). compressing http://localhost:8080/someapp/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces save 72,5kib (74% reduction). compressing http://localhost:8080/someapp/javax.faces.resource/theme.css.jsf?ln=primefaces-aristo save 53,4kib (71% reduction). compressing http://localhost:8080/someapp/javax.faces.resource/jsf.js.jsf?ln=javax.faces save 49,6kib (78% reduction). ... i turned on compression in server.xml
<connector connectiontimeout="20000" port="8080" protocol="http/1.1" redirectport="8443" compression="on" nocompressionuseragents="gozilla, traviata" compressablemimetype="text/html,text/xml,text/plain,application/javascript,application/json,text/javascript"/> but doesn't compress mentioned files listed above.
what else have compression working?
jonny
your server.xml fine. concrete problem you've edited wrong server.xml file. in ide eclipse, original tomcat server installation default kept untouched. instead, eclipse creates copy of configuration files in servers project , uses workspace metadata deploy webapps , tomcat server engine been used tomcat installation.
make sure you're editing right server.xml file, 1 in servers project:

tomcat's own /conf/server.xml file used when start outside eclipse, or when tell eclipse take full control on tomcat installation instead. that, doubleclick tomcat server entry in servers view , alter server locations accordingly.

Comments
Post a Comment