Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Losing session between different web apps.

 
Alaa Abutabaq
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm facing a problem in tracking session between different webapps. When i request from a page in a web app to a page in a diff web app, I lose the session.I use Sun one web server 6.1. Is there a way to keep tracking sessions between web apps?
Thanks in advance
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say "web app", I assume you mean a separate web context and not a single context on separate machines?

If you are, then sessions don't work that way. A session is specific to an application context, and while the session ID in some containers may be the same between contexts, the session itself is not. It is possible to create messages between web applications, but you may find it better to have a 'common area' such as shared Database or business tier to allow the applications to communicate.

Be careful that you don't try to replicate the session's responsibility though. Doing so is dangerous since it may not be completely compatible with the existing session mananger and prevent clustering, or it may cause the original session manager to become unstable.

I hope this helps.
Dave
 
Alaa Abutabaq
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much for your help. I think about that, but i wished if i have a way to use the same session. It seems there is no way.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are very good reasons why you can't, security being prime among them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic