This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Servlets and the fly likes Session object in multihost environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session object in multihost environment" Watch "Session object in multihost environment" New topic

Session object in multihost environment

Alex Grig
Ranch Hand

Joined: Oct 19, 2001
Posts: 38
Suppose, i created session object at (or http://localhost:8080).
Could anyone explain me how to get this session object from different host (or http://localhost:8081).
So if session object lives in memory on the servlet container it must be some ways to keep session in multihost environment.

Alex J.Grig

Alex J.Grig
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17144

It depends on your appserver - you'll have to RTFM.
Sessions are based on host URLs, so a true "multi host" session object sharing isn't appropriate. A clustered host, on the other hand, really SHOULD be capable of shared sessions if it intends to fully support having any server in the cluster able to service requests.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Session object in multihost environment
It's not a secret anymore!