[Building Sakai] viewState field in JSF

George Pipkin gpp8p at Virginia.EDU
Tue Jun 9 15:34:45 PDT 2009


Hi -

    I have made some modifications to Gradebook - partly in a backing bean
called CourseGradeDetailsBean and partly in a jsf called 
courseGradesDetails.jsp.  Anyway, I noticed that
even though the pages seemed to work on my development laptop, they 
didn't on a test serer.  The problem
was our ajp connector was complaining that the post size was too big.  
So I looked at what was coming down,
and there was an enormous hidden field called viewState that looked 
liked it contained a lot of encoded info.  I
checked on my developement laptop, and I saw the same situation, but the 
field was a little smaller.  Anyway
I Googled the whole viewState thing, and I found I could set a parameter 
in web.xml for the Gradebook
app -         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>


this was set to client, but you can set it to server, and this annoying 
field gets saved on the server instead.  I did
this and the problem went away.

My question is, are there any nasty surprises awaiting me having done 
this - particularly in a production environment ?
Is there something I'm doing in my JSF that causes this nasty thing to 
happen - and is there something I should be
doing differently ?  

                                   - George Pipkin
                                      U.Va.


More information about the sakai-dev mailing list