PDA

View Full Version : Session Time Out



waqasaslammmeo
26 Jul 2012, 8:27 PM
hello !
i have two forms , one is my login form and second is my main form. after login my main form will open , i want that if my session is expired then my login js will open , how can i do this ,please help me in this.
or if this is not possible then please can any one tell me how i can just check that is my session is expired or not ? i mean want to check the session state in extjs .

Regards

sword-it
26 Jul 2012, 10:10 PM
Hi!

in case of detecting session timeout, you may bind a requestexception listener to Ext.Ajax.
But your server must responds with HTTP status 401 when the session times out.

then you may use following:-



Ext.Ajax.on('requestexception', function(con, resp, op, e){
if(response.status == 401){
// redirect to login page
}
});

scottmartin
27 Jul 2012, 6:47 AM
You may also be interested in this client version as well:
http://www.sencha.com/forum/showthread.php?155346

Scott.