my dog learned polymorphism*
The moose likes Tomcat and the fly likes Accesing a server from the same browser with different domain URLs creates 2 different sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Accesing a server from the same browser with different domain URLs creates 2 different sessions" Watch "Accesing a server from the same browser with different domain URLs creates 2 different sessions" New topic
Author

Accesing a server from the same browser with different domain URLs creates 2 different sessions

David Rocks
Ranch Hand

Joined: Apr 24, 2001
Posts: 162
Hi,

I have a tomcat server (7.0.35) that takes in requests from different domain URLs, the content shown on the page differs depending on the domain url.

The problem I am having is that if I hit the same jsp on the same server from the same browser with a different domain url I get a different session made, I would like the session to remain over the different domains for functional reasons.

I have tried modifying the server configuration. single sign on, crossContext etc etc but I am guessing, I cannot see anything explicitly that refers to this scenario, most of the documentation refers to cross context authentication.

Any thoughts on the matter would be appreciated.

Thanks


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Cookies are domain-specific, so sessions are too.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Rocks
Ranch Hand

Joined: Apr 24, 2001
Posts: 162
Think I am resigning myself to the cookie/url/session split now.

Thought I could get something from manipulating the hosts and/or server config.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
You could always implement your own session equivalent collection class and use the user ID (assuming its the same for all URLs) to track it.
Bill

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Accesing a server from the same browser with different domain URLs creates 2 different sessions