I'm not sure it's possible to do what you want, but if it is here's part of the answer:
You have to use URL rewriting instead of session cookies to track the sessions. The browser doesn't know that two tabs are supposed to use different session IDs; it'll use the same session cookie for both. URL rewriting puts the jsessionid in every URL, so whatever link the user clicks on will use the appropriate session. To disable session cookies, set cookies=false in the <Context>. To use URL rewriting, use encodeURL() or <c:url> for all URLs displayed in web pages. -- Len On 5/17/07, M.Hockings <[EMAIL PROTECTED]> wrote:
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]