I don't think there is any natural way of doing that(?) but you could always use the application scope to store stuff e.g. in a Map with the user id as key...
That is of course an acceptable solution if there was only one or a few specific usecases. I guess the issue is that we would like our application to have this behaviour for all session-scoped data. It should
In essence, a new scope type
IDENTITYwould be ideal. I'm thinking of formulating a request for such a feature.
But in the meantime, perhaps there is someway of tricking the application or server into using the same HttpSession for both clients/browsers as long as the same identity is established?
Perhaps you could extend BasicContext and override stuff from Context to take the identity in account.
But yes, I see the usecase for custom scopes like that, haven't looked if there are JIRAs for it.