This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to keep session information while redirecting to another application on another server ?

 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All ,

I am working on banking application. There is a situation when we are redirecting to a different application installed on a different server. We are using sendRedirect to configurable URL.
Now there is a requirements to send this different application the session information while redirecting.

I understand that there is a new request / response send from the browser while redirecting to a different URL. So there is a new session and all the existing session info is lost.

What is the solution to implement this feature - may be without sendRedirect ?
 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramy, since it is a completely different application on a different server, I don't think you'll be able to share the session directly. You'll need to have your own mechanism like maybe persist the session information (in file or database) and read it in the other application or something similar...
 
Ramy Nady
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit for your response.

But I am not the one who needs this information. It is a different application with a different vendor (owner). That is why they can't access our back end even I persist it.
 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to develop some kind of mechanism to send them this data. Either a common database or provide them a service which they can call to get session data or something else...
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!