Java Question

Rerdirection to another site from my application

i am creating an application.i want to redirect from my application to another site.I am using username as session variable.But when it call back to my application then i dont getting session variable.I got the session variable as null.
I am using window.location.assign("sitename")

I have an application with my own username and password...after i login redirect to another site that site providing a login page.we enter the username and password of that site..then there is some processing is going on .then i got the result.but when return back i got the session null session.setAttribute("username", username);
session.setAttribute("password", password);

Answer Source

I got the answer We can use local storage concept.So that we can store the username and password in the browse itself when we redirect to another site.In the browser inspect -> Resources - >Local storage. In local storage we hava ea url and it should be the same in the browser. //to set the username localStorage.setItem("username", "Smith"); //to Retrieve the usernamelocalStorage.getItem("lastname");

Thank you