jboss中不同war模块之间的会话共享可能吗?
有没有一种简单的方法可以在jboss中的不同war模块之间共享会话?
我有一个在 jboss 中运行的 Grails 应用程序,但想要创建一个新的 Grails war 模块,它看起来 &感觉与现有的相同(但是,不希望用户再次登录)。域将是相同的,例如,如果我有 war1 和 war2,则域应该是
http://domain.com/war1 <-- 应该在此处完成登录.. http://domain.com/war2
我在网上搜索,但找不到简单/或困难的方法来做到这一点。 请帮忙~。
Is there an easy way to share session between different war modules in jboss?
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 <-- 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~.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不同应用程序的 servlet 之间不能共享 HTTP 会话。您真正需要的是单点登录解决方案。穷人的 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.
Good luck!