在两个tomcat服务器上的两个应用程序之间保持JSP会话活动 [英] Keeping JSP session alive between two applications on two tomcat servers
问题描述
我想在2个tomcat服务器上运行的两个不同的应用程序之间保持相同的会话.我在一台服务器上运行一个应用程序,并在登录时为其创建了一个会话.如果我单击该应用程序上的链接,它将被重定向到另一台Tomcat服务器上的第二个应用程序.那时,它应保持与第一台服务器相同的会话.之后,如果它返回到第一台服务器中的应用程序,则不应再次请求身份验证.它应该使用相同的会话.
是否可以在JSP中的两个tomcat服务器之间之间传递会话ID 或详细信息.
任何人都可以帮忙.
我认为您可能需要SSO(单一登录)解决方案.因此,这些是免费提供的一些开源软件:
您还可以按照上述重新发明轮子 ://www.mousetech.com/blog/?p = 11"rel =" nofollow"title ="为什么自己动手做的Java安全性很糟糕>在这里) >
希望这会有所帮助.
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.
这篇关于在两个tomcat服务器上的两个应用程序之间保持JSP会话活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!