wood burning stoves*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60046
    
  65

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: 12675
    
    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


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accesing a server from the same browser with different domain URLs creates 2 different sessions
 
Similar Threads
Java Session Tracking
Cookie - Web App mapping
Session tracking
distinguishing 2 browsers in the same session.
Is it possible to create JSESSIOINID per context (web application) in websphere(Single Domain)?