在两个tomcat服务器上的两个应用程序之间保持JSP会话活动 [英] Keeping JSP session alive between two applications on two tomcat servers

查看:84
本文介绍了在两个tomcat服务器上的两个应用程序之间保持JSP会话活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在2个tomcat服务器上运行的两个不同的应用程序之间保持相同的会话.我在一台服务器上运行一个应用程序,并在登录时为其创建了一个会话.如果我单击该应用程序上的链接,它将被重定向到另一台Tomcat服务器上的第二个应用程序.那时,它应保持与第一台服务器相同的会话.之后,如果它返回到第一台服务器中的应用程序,则不应再次请求身份验证.它应该使用相同的会话.

是否可以在JSP中的两个tomcat服务器之间之间传递会话ID 或详细信息.

任何人都可以帮忙.

解决方案

我认为您可能需要SSO(单一登录)解决方案.因此,这些是免费提供的一些开源软件:

  1. 打开AM (以前是Open SSO)
  2. JOSSO (Java开放式单点登录)
  3. CAS (中央身份验证服务)

您还可以按照上述重新发明轮子 ://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:

  1. Open AM (previously Open SSO)
  2. JOSSO (Java open Single Sign-On)
  3. CAS (Central Authentication Service)

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆