File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Session tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session tracking" Watch "Session tracking" New topic
Author

Session tracking

Cristian Popovici
Ranch Hand

Joined: Apr 13, 2007
Posts: 32
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

Joined: Sep 29, 2002
Posts: 1683
Do you have one application deployed to two servers or to a cluster?

Or do you have two applications deployed to two servers?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Cristian Popovici
Ranch Hand

Joined: Apr 13, 2007
Posts: 32
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

Joined: Mar 07, 2005
Posts: 232
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

Joined: Apr 20, 2006
Posts: 3344

That's a nice URL. Thanks Sripathy


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session tracking
 
Similar Threads
How to access a file on another server?
Problem with session stickyness on weblogic with apache proxy plugin
Failed to start Managed server
Maintaining Availability While Updating WAR app
Problem with session stickyness on weblogic 9.2.3 with apache 2211 proxy plugin