Less than 42 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling JSF Sessions  RSS feed

Don Ch
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a problem when my session in jsf times out. I have a logoutBean that handles the logout functionality for my app. The problem comes in when the session expires after period of time with no activity on the app. If i try then call the logout() method in my logoutBean i get the following error in Tomcat5.5 listed below (this is only a short extract, the exception thrown is a lot longer) Any idea on how to check if the session has expired before you submit a request??

SEVERE: Managedbean TopBean could not be created Can't instantiate class: 'za.co
.vodacom.rms.frontend.bean.TopBean'.. class za.co.vodacom.rms.frontend.bean.TopB
ean : java.lang.NullPointerException
javax.faces.FacesException: Can't instantiate class: 'za.co.vodacom.rms.frontend
.bean.TopBean'.. class za.co.vodacom.rms.frontend.bean.TopBean : java.lang.NullP
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactor
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreMan
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolve
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:145)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:166)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEval
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about adding a filter that checks whether the session is valid or not?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!