Re: Ajax Requests and Session Timeouts
Re: Ajax Requests and Session Timeouts
- Subject: Re: Ajax Requests and Session Timeouts
- From: Chuck Hill <email@hidden>
- Date: Mon, 22 Nov 2010 11:42:27 -0800
I use something like this:
public WOResponse handlePageRestorationErrorInContext(WOContext aContext)
{
WOComponent errorPage = pageWithName(pageRestorationErrorPageName(), aContext);
WOResponse response = null;
if (AjaxUtils.isAjaxRequest(aContext.request()))
{
AjaxUtils.redirectTo(errorPage);
response = errorPage.context().response();
aContext.session().savePage(errorPage);
}
else
{
response = errorPage.generateResponse();
}
response.setStatus(500);
return response;
}
On Nov 22, 2010, at 11:35 AM, Johnny Miller wrote:
> Hi,
>
> I'm sure this is discussed somewhere but I'm unable to find it.
>
> If a session timeouts between ajax requests how do you handle the response? I assume it is a combination of WOApplication's handleSessionRestorationErrorInContext and AjaxUtil.isAjaxRequest methods.
>
> Do you just return a javascript method in the response that redirects to a direct action? I can also see from wocontext that you may be able to triangulate which page the request originated from.
>
> Anyway, any advice would be greatly appreciated!
>
> Johnny Miller
> Kahalawai Media Corp
> http://www.kahalawai.com
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden