tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Hubbs <>
Subject Re: Tabbed browsers sharing session - work around.
Date Tue, 05 Oct 2010 14:13:00 GMT
Our app running on Tomcat 5.0.28 has some kind of kluge involving a 
flown-in vhosts.xml file in .../conf that uses aliases such that people 
can have separate sessions of the same app on separate tabs.  I have no 
idea if this is how this should have been done back in the olden days 
but more importantly I'd like to understand the "industrially correct" 
way to obtain this behavior under 6.0.* Tomcat...if it's not already the 

- Jeff

On 10/5/10 9:16 AM, Stephen Caine wrote:
> Rob,
> The way you describe session sharing is indeed a problem.  The way we deal with this
is to use a separate database table to keep track of window ids.  A unique value is assigned
when a window is opened and maintained until the window is closed.  Although the session may
be the same for all open windows (tabs), the window id is unique.  Significant values are
posted to the window table and retrieved based on the window id.
> If there is another method using a Tomcat centric approach, I would love to hear about
> Stephen
> On Oct 5, 2010, at 9:01 AM, Ronald Klop wrote:
>> Rob,
>> IE 6 is even more confusing. If you open a new window with ctrl-N you have the same
session sharing as with tabs. Only if you click the IE6-icon to start a new instance of the
process it will not share them. Opening a new tab in IE7 is like using ctrl-n to open a new
window in IE6.
>> Ronald.
>> Op dinsdag, 5 oktober 2010 10:26 schreef Rob Gregory<>:
>>> Hi Chris,
>>> Is there any way to dynamically create these contexts or do they require a live.xml,
test.xml, etc within conf/Catalina/localhost. The multiple contexts would be my preferred
approach although I would like to achieve this with a single code base if this is possible.
The multiple environments are driven purely by the backend database connection, i.e. the code
is the same with the only difference being where the data is being saved to. Hence the requirement
to stop the browser sharing the same session when in different database connections. I'm surprised
that other people are not having the same issues since the browser manufacturers decided to
make this crazy change to session management between tabs/instances and suddenly share the
same session. In I.E.6 two browser instances would be two separate sessions. I.E.7 they are
the same session! Thanks for your input.
>>> Kind Regards,
>>> Rob.
>>> Hash: SHA1
>>> Ronald,
>>> On 10/4/2010 6:11 AM, Ronald Klop wrote:
>>>> You can run your test environment on another hostname.
>>> Or under another context:
>>> The real question is why there's any confusion: your hostnames and/or
>>> URLs ought to be unique enough already. Otherwise, this sort of
>>> foolishness can affect your "real" users and you'll leak data all over
>>> the place.
>>> - -chris
>>> Version: GnuPG v1.4.10 (MingW32)
>>> Comment: Using GnuPG with Mozilla -
>>> 10UAoJdyNWqu0nlRGcWbJ6Mcc7zbsGy+
>>> =JP4k
>>> -----END PGP SIGNATURE-----
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message