jsf - ViewExpiredException after upgrade to jsf2 -
we upgraded major platform jsf 1.2 2.0. after upgrading we're getting several viewexpiredexception errors each hour. reading on topic seems expected exception when sessions expire, we've reviewed access logs , getting these exceptions when requests 5 minutes apart in cases.
my questions follows:
1) other session expiration, other conditions might cause viewexpiredexception?
2) exception we're logging doesn't contain detail exact condition causing exception (missing session, corrupt session, unable restore particular component). there way introduce additional logging find out specific situation triggering exception in each case?
mojarra 2.0.4-b09 tomcat 6 using memcached session manager session replication
any appreciated. thanks!
other session expiration, other conditions might cause viewexpiredexception?
the enduser has requested/created views within session , submitting old view. default max views per session 15. in other words, if enduser opens 16 browser windows/tabs on page form within same session , submits first one, user can viewexpiredexception.
the max views per session configureable in web.xml
<context-param> <param-name>com.sun.faces.numberofviewsinsession</param-name> <param-value>15</param-value> </context-param> see mojarra faq other parameters.
is there way introduce additional logging find out specific situation triggering exception in each case?
not through jsf and/or viewexpiredexception. whole exception means view not present in session anymore. can in turn indeed have more underlying causes. logging session creation , destroy using httpsessionlistener , logging session attribute modifications httpsessionattributelistener may helpful.
update per comments, pressing browser button on cached page containing form , submitting form thereafter indeed cause viewexpiredexception when view been expired. can solved in following 2 ways, preferably in combination of them:
- instruct browser not cache pages.
- do not use post forms plain page-to-page navigation.
for more detail, see this answer.
Comments
Post a Comment