Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Form based login & Session expiry(Client messes up with 302 and form from server)
Form based login & Session expiry [message #1283496] Thu, 03 April 2014 09:40 Go to next message
Fabian Henniges is currently offline Fabian Henniges
Messages: 6
Registered: March 2013
Junior Member
Is there a common way or workaround for failed ajax requests due to session expiry?

index.php/fa/17886/0/

index.php/fa/17885/0/
Re: Form based login & Session expiry [message #1288653 is a reply to message #1283496] Tue, 08 April 2014 15:08 Go to previous message
Fabian Henniges is currently offline Fabian Henniges
Messages: 6
Registered: March 2013
Junior Member
One solution is to let the client end the session just before the server would do it. Like home banking where session expiry is displayed and you get redirected after timeout.

To keep track of xml http requests I´ve redefined rwt.remote.Request.createXHR using a generated script and the JavaScriptExecutor. It also contains the result of RWT.getUISession().getHttpSession().getMaxInactiveInterval() as maxInactiveInterval.

The script uses setTimeout function to call a logoutRedirect function just before session expiry. That function calls a ServiceHandler to end the current session and reloads the page.

Works at least for IE8, current Firefox and Chrome.

Previous Topic:HTTP Status 500 - Unable to read the json message
Next Topic:Grid jumps to beginning (topIndex == 0)
Goto Forum:
  


Current Time: Wed Jul 30 17:26:05 EDT 2014

Powered by FUDForum. Page generated in 0.01459 seconds