You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Daniel Toffetti <dt...@yahoo.com.ar> on 2010/11/04 18:14:47 UTC
Problem with two users logging in two tabs of same browser window
Hi all,
I have a problem when two users log in the application from two tabs of
the same browser window, it looks as if both where working in the same
session, and the data entered by the second user appears as if entered by
the first user. It's an internal app and this problem happens rarely but
it's annoying when it happens.
The app holds the user id as a session variable. I've found this two
threads:
http://apache-wicket.1842946.n4.nabble.com/Wicket-Multi-Instance-Support-td1879743.html#a1879745
http://apache-wicket.1842946.n4.nabble.com/Creating-a-new-session-if-new-browser-tab-is-opened-td1868974.html#a1868975
but those didn't help me to figure out what's happening. Perhaps the
problem is an actually obvious one and I just can't guess it because of my
plain ignorance, so please don't hesitate to point out anything obvious.
I'm using Wicket 1.3.7 in production but I'm ready to migrate to 1.4.13
and would like to fix this before I deploy the upgrade, do I need to show
any app init code ??
Thanks for your help,
Daniel
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3027407.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser window
Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Thu, Nov 4, 2010 at 2:40 PM, Eelco Hillenius
<ee...@gmail.com>wrote:
> FWIW, we've talked in the past about making pagemaps more explicitly
> about supporting tabs and windows, but never got around taking that to
> the next level, also because we didn't all agree on how much we should
> focus on this in the first place.
>
Probably why they were removed in 1.5 :)
http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-tt2998780.html#a3000647
--
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Problem with two users logging in two tabs of same browser window
Posted by Eelco Hillenius <ee...@gmail.com>.
> Your browser doesn't identify a new tab as a new session. Therefore
> the servlet container doesn't know that it is a new user. If it is a
> valid usecase, you should build multi user session sharing in your
> app. If it is a bug, you should properly log out the first user when
> the new user is identified in the second tab.
Indeed. Pagemaps is the scoping mechanism within Wicket that maps to
tabs (and pages) within the same session, so while it would probably
be a bit clunky to code against initially (until you set up a bit of
abstraction around it), it should be useable to solve your problem.
FWIW, we've talked in the past about making pagemaps more explicitly
about supporting tabs and windows, but never got around taking that to
the next level, also because we didn't all agree on how much we should
focus on this in the first place.
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser window
Posted by Martijn Dashorst <ma...@gmail.com>.
IIRC there's new browser window detection code somewhere in Wicket (I
haven't touched it myself, but you can probably find it with some
googling and code browsing in the settings). When you detect a new
window show a label/link with text "Are you not <current username>?
Click here to change to your account". Make it prominent, but not
automatic: your normal user might want to use two tabs :-)
Another option is to ask the user "A new browser window is detected,
do you want to continue as a different user?"
Martijn
On Fri, Nov 5, 2010 at 6:44 PM, Daniel Toffetti <dt...@yahoo.com.ar> wrote:
>
> This is not a valid use case, so I must log out the first user, but how
> can I affect its own browser tab so that it displays a "logged out" message
> ? Is this possible ?
>
> Thanks for your help,
>
> Daniel
>
>
> Martijn Dashorst wrote:
>>
>> Your browser doesn't identify a new tab as a new session. Therefore
>> the servlet container doesn't know that it is a new user. If it is a
>> valid usecase, you should build multi user session sharing in your
>> app. If it is a bug, you should properly log out the first user when
>> the new user is identified in the second tab.
>>
>> Martijn
>>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3029083.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser
window
Posted by Daniel Toffetti <dt...@yahoo.com.ar>.
This is not a valid use case, so I must log out the first user, but how
can I affect its own browser tab so that it displays a "logged out" message
? Is this possible ?
Thanks for your help,
Daniel
Martijn Dashorst wrote:
>
> Your browser doesn't identify a new tab as a new session. Therefore
> the servlet container doesn't know that it is a new user. If it is a
> valid usecase, you should build multi user session sharing in your
> app. If it is a bug, you should properly log out the first user when
> the new user is identified in the second tab.
>
> Martijn
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3029083.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser window
Posted by Martijn Dashorst <ma...@gmail.com>.
Your browser doesn't identify a new tab as a new session. Therefore
the servlet container doesn't know that it is a new user. If it is a
valid usecase, you should build multi user session sharing in your
app. If it is a bug, you should properly log out the first user when
the new user is identified in the second tab.
Martijn
On Thu, Nov 4, 2010 at 6:14 PM, Daniel Toffetti <dt...@yahoo.com.ar> wrote:
>
> Hi all,
>
> I have a problem when two users log in the application from two tabs of
> the same browser window, it looks as if both where working in the same
> session, and the data entered by the second user appears as if entered by
> the first user. It's an internal app and this problem happens rarely but
> it's annoying when it happens.
> The app holds the user id as a session variable. I've found this two
> threads:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Multi-Instance-Support-td1879743.html#a1879745
> http://apache-wicket.1842946.n4.nabble.com/Creating-a-new-session-if-new-browser-tab-is-opened-td1868974.html#a1868975
>
> but those didn't help me to figure out what's happening. Perhaps the
> problem is an actually obvious one and I just can't guess it because of my
> plain ignorance, so please don't hesitate to point out anything obvious.
> I'm using Wicket 1.3.7 in production but I'm ready to migrate to 1.4.13
> and would like to fix this before I deploy the upgrade, do I need to show
> any app init code ??
>
> Thanks for your help,
>
> Daniel
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3027407.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser window
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!
> ;) If you mean the kind of entity proxies used by some persistence
> mechanisms, I'm using none of those. I have no static variables in my
> application or session, but... can this be the issue ?
What about cache.. do you have cache configured that can mistakenly
cache a jsessionid in the url?
Also, the different users use different browsers, yes?
>
> MyApplication.java:
> public static MyApplication get() {
> return (MyApplication) Application.get();
> }
>
> MySession.java:
> public static MySession get() {
> return (MySession) Session.get();
> }
These seem just fine.
**
Martin
>
> Martin Makundi wrote:
>>
>> Hi!
>> Yeah, migrate ;)
>>
>> Apart from that.. session leak can occur for quite some reasons. It
>> might be proxy bug or maybe you have static variables in places where
>> they should not be.
>> Martin
>>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3027490.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser
window
Posted by Daniel Toffetti <dt...@yahoo.com.ar>.
;) If you mean the kind of entity proxies used by some persistence
mechanisms, I'm using none of those. I have no static variables in my
application or session, but... can this be the issue ?
MyApplication.java:
public static MyApplication get() {
return (MyApplication) Application.get();
}
MySession.java:
public static MySession get() {
return (MySession) Session.get();
}
Cheers,
Daniel
Martin Makundi wrote:
>
> Hi!
> Yeah, migrate ;)
>
> Apart from that.. session leak can occur for quite some reasons. It
> might be proxy bug or maybe you have static variables in places where
> they should not be.
> Martin
>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3027490.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem with two users logging in two tabs of same browser window
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!
Yeah, migrate ;)
Apart from that.. session leak can occur for quite some reasons. It
might be proxy bug or maybe you have static variables in places where
they should not be.
**
Martin
2010/11/4 Daniel Toffetti <dt...@yahoo.com.ar>:
>
> Hi all,
>
> I have a problem when two users log in the application from two tabs of
> the same browser window, it looks as if both where working in the same
> session, and the data entered by the second user appears as if entered by
> the first user. It's an internal app and this problem happens rarely but
> it's annoying when it happens.
> The app holds the user id as a session variable. I've found this two
> threads:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Multi-Instance-Support-td1879743.html#a1879745
> http://apache-wicket.1842946.n4.nabble.com/Creating-a-new-session-if-new-browser-tab-is-opened-td1868974.html#a1868975
>
> but those didn't help me to figure out what's happening. Perhaps the
> problem is an actually obvious one and I just can't guess it because of my
> plain ignorance, so please don't hesitate to point out anything obvious.
> I'm using Wicket 1.3.7 in production but I'm ready to migrate to 1.4.13
> and would like to fix this before I deploy the upgrade, do I need to show
> any app init code ??
>
> Thanks for your help,
>
> Daniel
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-two-users-logging-in-two-tabs-of-same-browser-window-tp3027407p3027407.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org