Hi M.Hockings,
If you tell us exactly wot it is u trying to do maybe we can find a
solution... but here is an idea.
A session is just a cookie stored under the domain name... so JSessionID is
given a unique number like AABB445566778899 and that number is tracked.
When you store stuff in a session its really just mapped to that number.
As long as the domain is the same... that number comes back from the browser
and that means all the stuff you have stored in its attributes is
recallable.
So if you have stored form data in the session... if the user opens another
window, it will appear the same.... and I think thats your problem, also
most of the time its what a user expects.
In the old days when all browsers didnt support cookies... you had the
choice of writing the persistant info into the URL.... a little like google
does it.... or one could use hidden form fields. These other techniques are
page specific and I think thats wot you looking for.
So... you can still store stuff in the session... its nice and easy... but
wot you also do is generate a unique number and stick it in a hidden field
on the first form registration page request. So when that is returned you
getting info that says.... its from that browser, AABB445566778899
registration process XX1, XX2 etc.
Important thing I wanted to say it that you dont really want to mess with
the main session.... its got too much functionality behind it... like
session objects and attribute are cleaned up for you.... they used in load
sharing to detect browsers... they used in security for SSO... etc etc....
if you do manage to change it... I think you will end up with a whole bunch
of other problems.....
I think all you need to do is look up hidden form fields....have fun.
----- Original Message -----
From: "M.Hockings" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, May 17, 2007 11:39 PM
Subject: How to get Tomcat to give a new session for a new window
I would like, somehow, to be able to programatically create a new session
on demand but I can't quite figure out how to get Tomcat to give me one.
That is, for our webapp it can detect at logon when a session is in use and
currently gives the user an already-in-use message. What we would like to
do is when this condition is detected force the creation of a new session
without damaging the old one. This would happen for example when the user
tries to start a second instance of the webapp in a new browser tab or
child window.
Is there any way to do this? I have tried request.getSession(true) but it
only creates a session if one does not already exist.
Thanks for any thoughts or suggestions.
Mike
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]