If IE opens a new window (either through javascript or from the
file/new/window menu) and IE is in a session, the session is shared between
the two browser sessions.

If you open two copies of IE from the operating system, they will not share
the session.

The only way to solve this that I know of, is to keep a session token, if
you find it out of sequence, forward to a page which closes the window (if
javascript is enabled).  If you use tokens on your update sequences you
should be able to live with the two browsers in the same session.

Edgar

-----Original Message-----
From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 7:19 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Session Problem


I had a similar problem.
I have two browsers opened with diferent sessions (and logged on with
different users to my app) in the same machine.
In one browser, I click a button that opens a new window (window.open in
javascript) and in this new window a submit is performed to an action of
struts. This action has an execute that checks isTokenValid and gives
false, not because I haven't saved token first, but because session are
different. 

     */
    protected boolean isTokenValid(HttpServletRequest request) {

        // Retrieve the saved transaction token from our session
        HttpSession session = request.getSession(false);

                //--> here, session id is different of the main window
session, but equals to the other window session.        
        
        if (session == null)
                .....
                .....
                .....

                //as session id is wrong, token is invalid.
}

If I have one only main browser opened this problem doesn't happen. I
think that it can be a window.open IE problem, but I still couldn't find
out a solution. 

If anyone has one...
Thanks..
Guillermo.

-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Viernes, 16 de Enero de 2004 08:38 a.m.
To: Struts
Subject: RE: Session Problem


<snip>
How do I make sure the session on both the browsers will be different
other than URL Rewriting. </snip>

This I do not know. :-(
You can take a look through all the browser options and see if there is
anything to make it associate cookies only with a specific window, but I
would be quite surprised if there is such an option. I suspect in the
absense of url rewriting you will need to use either different machines
for each browser, or a different browser (ie open second window in
mozilla or something). Hopefully Im wrong on that and someone else on
this list has a better idea!

-----Original Message-----
From: Parag Pattewar [mailto:[EMAIL PROTECTED]
Sent: Friday, 16 January 2004 19:31
To: [EMAIL PROTECTED]
Subject: RE: Session Problem


Hi

I tried to use URL rewriting explicetly for session tracking,
unfortunately I wont be able to use this because Its not been guaranteed
in the code is been written using <html:link> always for the links. As
both the browsers sessions are using only the same cookies, so I think
the problem is because of that. How do I make sure the session on both
the browsers will be different other than URL Rewriting.

Thanks
Parag

-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 4:51 PM
To: Struts Users Mailing List
Subject: RE: Session Problem


On the same machine? Rather sounds like its the same session. Im not
sure about IE6, but as I recall, IE5 will share its cookies between the
various windows if cookies are enabled. If cookies are disabled then url
writing takes over (asuming youve made sure your links are re-written by
using the appropriate tags) which means they shouldlnt share sessions if
opened seperately. You could test this theory by disabling cookies in
your browser and see if it makes a difference.

Put it a log statement somewhere to log the sessionId and compare the
results for both the windows to see if it is indeed a different session,
or if the second window causes the first window to end up in the
second's session.


-----Original Message-----
From: Parag Pattewar [mailto:[EMAIL PROTECTED]
Sent: Friday, 16 January 2004 19:17
To: [EMAIL PROTECTED]
Subject: Session Problem


Hi

I am getting session collusion problem , if I open my application on two
IE5.5 browsers , after some time , I am getting same values and junk
values which are not applicable for that session , but will be
applicable for the session present on other browser.

Please help, What could be the problem?

Thanks and Regards
Parag Pattewar
Persistent Systems Private Limited
"Bhageerath"
402, Senapati Bapat Road
Pune 411016
India

Tel: +91 (20) 2567 8900 extn. 2640
Fax: +91 (20) 2567 8901


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to