Session Timeout Handling on JSF AJAX request
When we develop JSF application with AJAX behaviour, we may experience the problem in handling timeout scenario of Ajax request. For example, if you are using J2EE Form-based authentication, a normal request should be redirected to the login page after session timeout. However, if your request is AJAX, the response could not be treated properly on the client-side. User will remain on the same page and does not aware that the session is expired. Many people proposed solution for this issue. The followings are two of possible solutions involve the use of Spring security framework: 1. Oleg Varaksin's post 2. Spring Security 3 and ICEfaces 3 Tutorial Yet, some applications may just using simple mechanism to stored their authentication and authorization information in session. For those application that is not using Spring Security framework, how can they handle such problem? I just modified the solution proposed by Oleg Varaksin a bit as my reference. First, create a simple s...