Problem scenario:
1)User logs in to a Web App
2)Accesses some information.
3)Use case demands that this Web Application interact with another Web-Application (through a hyper link /servlet call) located in the same Application server
Ho do we share HTTPSession information
(apart from storing stuff as Cookies , in HTTP header and CGI/HTML hidden elements)
-
pattern for sharing HTTPSession across WebApps? (6 messages)
- Posted by: Nagg rao
- Posted on: January 08 2004 14:23 EST
Threaded Messages (6)
- pattern for sharing HTTPSession across WebApps? by Paul Strack on January 08 2004 18:56 EST
- pattern for sharing HTTPSession across WebApps? by Nagg rao on January 10 2004 10:07 EST
- pattern for sharing HTTPSession across WebApps? by Rob Misek on January 09 2004 17:00 EST
- pattern for sharing HTTPSession across WebApps? by Nagg rao on January 10 2004 10:09 EST
- pattern for sharing HTTPSession across WebApps? by Sean Sullivan on January 10 2004 15:30 EST
- pattern for sharing HTTPSession across WebApps? by Amin Qazi on October 06 2004 14:28 EDT
-
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Paul Strack
- Posted on: January 08 2004 18:56 EST
- in response to Nagg rao
Try this:
1. Use the ServletContext.getContext(contextPath) to retrieve the context for the other web application.
2. Get a request dispatcher to the other context, targeting a ShareSessionServlet in the other Web Application.
3. Extract session data, and store it the request as request attributes.
4. Forward the request to the ShareSessionServlet in the other web app. Copy session data back out of the request and into the session of the other web application.
I suggest you don't copy all the session data. Just copy what you need (probably security credentials). -
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Nagg rao
- Posted on: January 10 2004 10:07 EST
- in response to Paul Strack
yesh sounds like an idea.thank you ! -
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Rob Misek
- Posted on: January 09 2004 17:00 EST
- in response to Nagg rao
Hi Nagraj,
Another approach to accomplish this as well as providing the utmost in high availability and fault-tolerance of you http session data would be to use Coherence*Web included in the latest build of Coherence. This allows the use of all the different caching strategies supported by Coherence (i.e. Replicated, Distributed/Partitioned, Near/Distributed, Overflow to Disk, Write-Behind to a datastore, etc.) to manage/store you session data.
Later,
Rob Misek
Tangosol Coherence: Cluster your Work. Work your Cluster.
Coherence Forums. -
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Nagg rao
- Posted on: January 10 2004 10:09 EST
- in response to Rob Misek
Coherence might have been an option but its too late now since we are in the middle of our project and its too risky to change/redefine and introduce an extra piece in the architecture -
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: January 10 2004 15:30 EST
- in response to Nagg rao
Are your applications spread across multiple EAR's?
Or are the applications all kept in a single EAR? -
pattern for sharing HTTPSession across WebApps?[ Go to top ]
- Posted by: Amin Qazi
- Posted on: October 06 2004 14:28 EDT
- in response to Sean Sullivan
I have application in different ears deployed in different instances of application server on the same box. I like to find out a way to do session sharing among thoes applications including session time-outs.
Any ideas??