tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <>
Subject RE: Multiple Sessions per user
Date Thu, 16 Feb 2006 13:39:35 GMT
> From: Daniel Guggi [] 
> I ran into a session-issue with a webapp. There are situations when it
> would be nice for a user (same browser/same machine/same 
> webapp) to have
> the possibility to login twice and thus have two different 

If you use cookies to store the JSESSIONID, they're common to each
browser process (for in-memory) or across all browser processes (for
on-disk) cookies.  So one approach that I use when testing webapps is to
start two processes and ensure the cookies are in-memory.  Unless you're
using multiple client processes, I'm not aware of any cookie-based
approach that'll work.

If you embed the JSESSIONID in the URL using URL rewriting, then you
could arbitrarily elect to change the embedded JSESSIONID in a response
that you returned to the user.  However, you have all the usual fun
issues of copy/paste URLs, favourites, and so on.

A third approach would be to manage your sessions yourself, using custom
code.  There may be libraries out there that help with this, but I've
not needed to do it and therefore don't know any.

		- Peter

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

View raw message