A user session is like a place that Java web applications use to store data about each user. Each time a user access the application, a new session object is assigned to it. That means that each user has its own session. A session allows us to identify a user. It is a temporal storage where we (and Vaadin) can put data relevant to a user.
Because sessions are temporal, we can configure their lifetime (or timeout) in
<web-app ...> ... <session-config> <session-timeout>20</session-timeout> </session-config> </web-app>
Here, each session will last 20 minutes since the last time the user requested something to the server.
Vaadin automatically preserves the state of UI components (if
@preserveOnRefresh is present) by storing ...