This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session tracking

 
Cristian Popovici
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I need some help.
I have a web application that is running on 2 servers (lets say A and B) and has the posibility to go from server A to server B and vice versa.
My problem is that I need to keep the user logged in on both servers.
What i am trying to do is to loggin the user on node A and if a page is requested from node B then pass the credentials from node A and do a login on node B. My problem is that the session on node A is lost. Is there a good solution to keep sessions opened on both servers?

Cheers,
Cristian.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have one application deployed to two servers or to a cluster?

Or do you have two applications deployed to two servers?
 
Cristian Popovici
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roger,

I have the same app deployed on two independent web servers, no cluster and no session replication. I need to do a remote login on both servers and this has two work also if the servers are running on the same machine but different ports (say localhost:8080 and localhost:8081)

Regards,
Cristian
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try to use 'persistent cookies" for this?
you can store the user details in a persistent cookie and erase it only when user does signoff.

http://www.allaboutcookies.org/cookies/cookies-the-same.html
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a nice URL. Thanks Sripathy
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic