Going through an abstract in a book, I came across this:
On the server side, the state can be stored as a shallow copy or as a deep copy. In a shallow copy, the state is not serialized in the session. By default, JSF Mojarra uses shallow copy.
I seriously couldn't understand this.
Since in the above case, we will have-
javax.faces.STATE_SAVING_METHOD
set to server
,
and an input hidden field javax.faces.ViewState
with a value somewhat like this "2870966362946771868:-8449289062699033744"
.
Obviously, the server must have maintained internally an state corresponding to the above hidden field.
But going by the abstract, if the state is not serialized in the session, then where it is?
Furthermore, I have noticed one thing that if my Managed bean(ViewScoped
) is not implementing marker interface Serializable
with STATE_SAVING_METHOD
set to server
, then in Mojarra
, the NotSerializablEexception
doesn't occur, while in MyFaces
it does.