Hi I want to keep same session between two different application which are running on 2 tomcat servers. I have one application running on one server for which one session is created while logging in . If I click a link on the application, it will be redirected to second application on another tomcat server. At that time, it should maintain the same session which is in the first server. After that if it returns to the application in the first server, it should not ask for authentication again. It should use the same session.
Is there any way to pass the session ID or details between the 2 tomcat servers in JSP.
Can anyone help.
I think you might want a SSO (Single Sign-On) solution. So here are these which are available for free and some open source:
You can also build some custom security in both these web-applications using Servlet filters following the approach as mentioned here.
Note: Go for the custom solution (it would be a pain but a good learning ;-)) only if you don’t want to use any of the SSO solutions; I will suggest not to Reinvent-the-wheel due to the reasons given here)
Hope this helps.