File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Share session between web apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Share session between web apps" Watch "Share session between web apps" New topic

Share session between web apps

chris freeborn

Joined: Jan 27, 2004
Posts: 2
Can we share session attribute values between different web apps in the same web app server?
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
I would venture an educated guess that the answer would be "No".
Why don't you try it out for yourself? Can't be that hard.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63534

Though I have yet to venture down that path, it is possible to set up your web apps (contexts) such that they can make cross-context calls to each other. They have to be set up this way (there's an attribute on the context attribute of Tomcat's server.xml that enables this -- not sure how other servers may operate).
Sorry I couldn't give you more specifics. But perhaps this is enough to get you researching down the correct path -- or others that have actually done this could chime in.
Another possibility is to step out of the servlet mechanisms and use RMI or other comm mechanisms.
[ February 09, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Share session between web apps
It's not a secret anymore!