I've solved this problem before by setting an HTTP header in my response for
AJAX requests that reports a status (x-myapp-status=success). If the header
is not there but you get a successful response from your XHR you can assume
that it's not content you want and do something appropriate (redirect the
whole page to login, or display an error)

Josh

On Fri, Jun 27, 2008 at 1:29 AM, Janko Muzykant <[EMAIL PROTECTED]> wrote:

>
> hi, i'm curious how you handle situation when ajax request is being sent
> but
> page fragment cannot be rendererd because it depends on session which has
> expired in a meantime.
>
> here is typical request flow in my application:
>
> * users clicks actionLink linked with some zone
> * acegi detects no credentials in session (session has expired)
> * acegi redirects to login page
> * but hey! this is still XHR. rendered page returns to client
> * ...and nothing changes. we got entire login page in response but it is
> useless as it will be not displayed.
>
> i have no idea how to solve that problem. could you suggest something?
>
> thanks,
> jm.
>
>
>
> --
> View this message in context:
> http://www.nabble.com/-T5--Ajax-request-and-expired-session-tp18150477p18150477.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to