简体   繁体   中英

How Can i get the value from SessionStorage using JAVA

I developed some code with javascript to retrieve an xhr response and I stored the value in the sessionStorage,

var token = xhr.response;
sessionStorage.setItem('Token=', token);

Now I need to retrieve this value in my java class. Do you have any idea on how I can retrieve the value of sessionStorage or how to pass the javascript variable in the java class?

Thank you for your answers.

sessionStorage lives only in browser, to make the data available in your server you need to send it to the server. here is a similar question that should explain on how you could do it HTML5 session storage send to server .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM