HTML5 Localstorage access using Java

2019-07-05 12:58发布

Is it possible to access localstorage object using Java directly? If yes how?

Update: I am aware that localstorage is client side and java is server side but I read on net that GWT have api that allow to read localstorage.

2条回答
甜甜的少女心
2楼-- · 2019-07-05 13:18

Localstorage is better alternative thamn Cookie. So, I am waiting JAVA support without external library for accessing local web storage, too. Now I am using sellenium support. Please, look at https://gist.github.com/dariodiaz/5079695

查看更多
别忘想泡老子
3楼-- · 2019-07-05 13:34

The local storage, as its name indicates, stores information locally, which means in the browser, at client-side. The servlet filter executes at server-side. There is no way to access the local storage at server-side.

If you need to access some ID stored in the local storage from a servlet filter, then retrieve this ID from the local storage in JavaSCript, and send a request containing this ID to the server.

查看更多
登录 后发表回答