JSF Tip #60 - What does 'com.sun.faces.compressViewState' do?
Note this blog is obsolete, see https://www.manorrock.com/blog/ for the current blog
In every JSF application view state is kept either on the client or on the server. How do you make sure this state is smaller?
The 'com.sun.faces.compressViewState' comes in handy here. It makes it so that the Mojarra runtime will Gzip compress the view state. Note the context-param is set by default to true, so only if you want to turn it off you will need to do something.
In your web.xml file this would look like the snippet below
<param-value>false | true</param-value>
Note the value is either "true" or "false"
And that is it.