It's not a secret anymore!*
The moose likes Servlets and the fly likes Sharing Session Between Different Web apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sharing Session Between Different Web apps" Watch "Sharing Session Between Different Web apps" New topic
Author

Sharing Session Between Different Web apps

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
Hello All,

What are the different ways to Share session data between two different web applications?

I have a requirement to log in to one web application and clicking on link my browser will display screens of different web apps and at same time I have to transfer all the data in current session.

kindly let me know the possible solutions for this.

cheers
-Praful


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
If you want to share anything between two different web applications, then you will have to use something which is not specific to any particular web application for example you can use DB or XML files for it.
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
Hello Rathi,

Thanks much for your reply,that is sure one of the option,but I was thinking something like..
1 Login Thur webabp1
2 populating session
3 Clicking of Link to connect to webapp2
4 Invoking servlet in webapp1
5 Connecting to webapp2
6 transfer session data
7 display output from webapp1

I am about to try this option with HttpURLConnection,not sure if i can transfer objects using this method,if any one is aware of it kindly let me know.

-Praful
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
Incase some one wants to do this in future I used Http tunneling for the same

Cheers
-Praful
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Sharing Session Between Different Web apps
 
Similar Threads
JSF Problem: session is shared between all clients
Sharing data between web app's
How can i share the session between webapps?
Passing session data between Servlets residing in different machines
Share session between web apps