javasessionspring-securitysingle-sign-onjosso

How to share session across two web applications deployed in two different tomcat instances


I have two different web applications running on two different instances of tomcat. I need to be having a common page with links to both the applications. But I should be able to log in only once and should be able to access links in the other application without being asked to login again. Is there a way to do it ?


Solution

  • You can use a token parameter, where the token could be the username/some credentials encrypted. You can verify the credentials are correct in the 2 apps.

    An alternative, if your applications are under the same domain would be set cookies and recreate the session from them.