This content has been marked as final.
Show 1 reply
-
1. Re: How to redirect a session expired page automatically?
sergeysmirnov Jul 20, 2007 7:01 PM (in response to hefeng)If you speak about the situation with session expirared during the ajax request, it is key moment that the request itself is posted by the XMLHTTPRequest object, but not from the browser. The object expects to receive the XML from the server. So, it does not help if you write a filter and send the redirected page. The object just does not understand this "gift".
Ajax4jsf has a javascript hookup.
See Section 5.2.2 at:
http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/docs/devguide/en/html_single/index.html
The idea is overwriting this A4J.AJAX.onExpired function and performing a redirect (using document.location="...."). Such redirect will be sent behalf of the browser itself, so the user will see the redirect page then.