jboss 中不同战争模块之间的会话共享可能吗? [英] session share between different war modules possible in jboss?
问题描述
有没有一种简单的方法可以在 jboss 中的不同战争模块之间共享会话?
Is there an easy way to share session between different war modules in jboss?
我有一个在 jboss 中运行的 Grails 应用程序,但想创建一个新的 Grails 战争模块,它看起来 &感觉和现有的一样(但是,不希望用户再次登录).域将相同,例如,如果我有war1和war2,域应该是
I have a Grails app running in jboss, but want to create a new Grails war module which looks & feels the same as the existing one (but, don't want user to login again). The domain will be same, for example, if I have war1 and war2, the domain should be
http://domain.com/war1 <-- 登录应该在这里完成..http://domain.com/war2
http://domain.com/war1 <-- login should be done here.. http://domain.com/war2
我在网上搜索,但找不到简单/或困难的方法来做到这一点.请帮忙~.
I searched through the web, but couldn't find an easy/or difficult way to do this. Please help~.
推荐答案
任何 HTTP 会话都不能在来自不同应用程序的 servlet 之间共享.您真正需要的是单点登录解决方案.一个穷人的 SSO 可以用 cookie 来构建,但我不会称之为非常安全的方式.第一个会话可以设置 cookie,第二个会话可以读取相同的 cookie - 只要两个应用的域相同,这就会起作用.
No HTTP sessions are not shareable between servlets from different apps. What you really need is a Single Sign On solution. A poor man's SSO can be built with cookies but I wouldn't call it a very secure way. First session can set a cookie and the second session can read the same cookie - this will work as long as the domains are the same for both apps.
祝你好运!
这篇关于jboss 中不同战争模块之间的会话共享可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!