On Mon, Nov 2, 2009 at 5:03 AM, Pid <p...@pidster.com> wrote:

> On 02/11/2009 10:06, S Arvind wrote:
>
>> Hi Tomcat developers,
>>
>>            Bascially my requirement is ability to control the session
>> sharing in browser. Till now we maintained each application as differnet
>> context but pointing to same doc-base. So different web application will
>> be
>> running on a same code to control the session sharing between different
>> application . But now we want to run in same context as one application
>> but
>> control the session sharing. So i planned to customise session creation n
>> management of the tomcat to our requirements to add some value to
>> *path*attribute in session. Is this possible?
>>
>
>
> I'm not sure your question is very clear, perhaps if you are able to make
> your question clearer someone will be able to help.
>
>
If I understand correctly, you want to combine apps under a single context,
but you still want some control over data in session, perhaps using a 'path'
within the session object to store different values for different 'apps.'

I know next to nothing about session management infrastructure in tomcat,
but I happened to notice another mail o the list that mentioned the
SessionManager which is specified in context.xml (I think).  Based on that
small piece of information, I'm guessing that you could provide your own
SessionManager, which is likely responsible for creating new sessions and
managing existing sessions.  If so, it seems likely that you can manage
sessions any way you'd like.  For instance, whenever the session object is
accessed, you could first inject the current 'path' for the request based on
attributes in the request object, which would cause all attributes to be set
with that path prefix in the session during that request.

Documentation for the SessionManager object is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

Reply via email to