2

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~.

CIF
  • 1,754
  • 2
  • 18
  • 30

1 Answers1

1

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!

dbrin
  • 15,525
  • 4
  • 56
  • 83
  • How do you plan to implement SSO without cookie? – Ashwin May 04 '12 at 14:07
  • You are right, what I should have said was an encrypted cookie (ala SiteMinder). however there are other ways I suppose too: http://stackoverflow.com/questions/3832057/single-sign-on-without-cookies-in-java – dbrin May 04 '12 at 17:37
  • :That is URL Rewriting. Cookie is better compared to that, I guess. So you meant cookies sent during https? – Ashwin May 05 '12 at 01:08