cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens" <>
Subject Re: Accessing Sessions
Date Fri, 22 Sep 2006 06:40:45 GMT
>From: Jason Johnston <>
>Subject: Re: Accessing Sessions
>Date: Thu, 21 Sep 2006 07:15:27 -0600
>Bardo Nelgen wrote:
>>Hi all,
>>how can I obtain a list of
>>a) the current session-id of the current context (hopefully named that 
>>b) all currently active sessions
>>from Cocoon via
>>1. FlowScript
>>2. inside a generator
>>3. inside an action
>I can answer for a) ... I'm not sure if b) is possible but hopefully others 
>will chime in.

Well, HttpSessionContext contains a getIds() method, but that's been 
deprecated since servlet 2.1.  Also, I don't think Cocoon's own Session 
interface contains a getSessionContext() method anyway.
I guess the more up to date method would be to create a HttpSessionListener 
that tracks the IDs being created/destroyed and lets you query the current 
list.  You could then call that from the Cocoon components as required 
(you'll need the list & query method to be static, and watch out for 
threading issues).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message