the situation is. if the ViewExpiredException thrown,i开发者_运维百科nstead of redirect to another/login page,i want to restore its session before.is there any way to do that?
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
精彩评论