0

the situation is. if the ViewExpiredException thrown,instead of redirect to another/login page,i want to restore its session before.is there any way to do that?

Azuan
  • 878
  • 2
  • 13
  • 33

1 Answers1

1

No, that's not possible. It's already completely lost in the black hole. That's exactly why this exception is been thrown.

You can however just prevent it from happening. You could for example introduce some simple Ajax poller in the view side to keep the session alive at the server side. You can find an example in the following answer: Preventing session timeout during long processing time in JSF

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555