how to detect another opened tab?

I want to forbid multiple opened tabs with the same application. How can I do that in Vaadin 7? I mean I want to display some error message, if user tryies to sign in to application in different browser tab.

With Vaadin 7, all tabs use the same servlet instance, but multiple UIs. You could track this with storing a marker into the session in the UI init method (or check if there already is an active UI, providing you can get the list from somwhere. Can’t remember the API right now, sorry). There are some downsides; if one UI fails for some reason (e.g. deadlock) or it isn’t cleaned properly (user closes the browser), you might have a situation where the user can’t use the app at all.