Herv� Guidetti wrote:
>
> Hi,
> I have a user list. When I select a user in this list, I'd like to create a
> *new* window of my browser and then log as him.
>
> I try something like <a
> href="$link/template/myTemptale.vm/action/LoginUser/username/theUser/passwor
> d/pwd" target="_blank">log</a>
>
> The problem is : if I use target="_blank" it create a new bowser but with
> the same session id. So it logs as the user and log me out in the other
> windows (because the 2 windows have the same session id).
>
> My question is : how can I create a new windows with another session id or
> how can I tell Turbine to create a new session for the new window?
> Do you have another idea to revolve the problem ?
>
This should be addressed in the servlet container settings:
you can't use cookies for storing session values because cookies are shared
between all the open browser windows, but containers will typically enable you
to use URL rewriting instead of cookies.
Once you have URL rewriting, it's very easy to "lose" a session, you simply have to
forget to use the encodeURL() servlet API method and you'll automatically lose your
session... of course, the trick in this case is to make sure you keep the session
everywhere you need it :)
Another way container specific way:
before activating the link, use some client-side javascript to remove the session
cookie (but that means you know the cookie name, which is container dependant)
--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]