jboss中不同war模块之间的会话共享可能吗?

发布于 2025-01-04 00:39:58 字数 388 浏览 1 评论 0原文

有没有一种简单的方法可以在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那小子欠揍 2025-01-11 00:39:58

不同应用程序的 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文