O'Reilly logo

Vaadin 7 UI Design By Example Beginner's Guide by Alejandro Duarte

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

User session

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.

Note

Because sessions are temporal, we can configure their lifetime (or timeout) in web.xml:

<web-app ...>
   ...
  <session-config>
    <session-timeout>20</session-timeout>
  </session-config>
</web-app>

Note

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required