Without more detail it's hard to say why your response is empty. You don't
need a session to return a response from your AJAX handler. You could check
your objects that you are getting from the session and if they are null set
the response header.

On Mon, Jun 30, 2008 at 11:08 AM, Julian Wood <[EMAIL PROTECTED]> wrote:

> I've been interested in a solution to this too. When I place a header in
> the response object in an AJAX handler, however, it is always there,
> regardless of whether the application has timed out or not. The AJAX
> response content is still just {}. Is it possible to tell from within the
> app whether or not the session has expired, so that this header can be set
> conditionally?
>
> Thanks,
>
> J
>
>
>
>
> On 29-Jun-08, at 1:19 AM, Josh Canfield wrote:
>
> 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.
>>
>
>
> ---------------------------------------------------------------------
> 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