Allow user to open App in browser more than once

B"H

Hi,

Look like when open app twice (vaadin 14), even if it load from 2 different deployments, session for the previous get invalid.



What is the way to change this behave? how can be that different urls end with same result?

Thanks

Hi,

The sessions are based on cookie and the cookie is saved based on the name and the hostname.
For example if you are running two spring boot or tomcat applications and try to connect on these 2 applications:

  1. For the first application (running in localhost:8080), a session is created with by default a name JSESSIONID and the host localhost
  2. For the first application (running in localhost:8090), a session is created with by default a name JSESSIONID and the host localhost and will invalidate the first application.

You can:

  1. change the url (for example app1:8080 and app2:8090).
  2. Change the session cookie name which depends on your architecture/server. For Spring Boot, you can change it this way: server.servlet.session.cookie.name = ANOTHERSESSIONID

I’m not sure if it’s your case, if not, you can add more details on your configuration (urls example, servers).

B"H

Thanks a lot for your detaild answer :slight_smile: