How to retrieve the session stored in the background in the html5 page

this is how I put the information into session in the background, and the content is an entity object

session.getSession().setAttribute("userinfo", userInfoEntity);

so how can I easily and quickly retrieve the information in this session on the html5 page?

Mar.23,2021

cannot get session.


Save session to browser via cookie.


1. Replace the page with jsp
2. Information is not passed through session


  1. use templates instead of static pages
  2. the backend provides the interface to get session, and then the front end acquires it asynchronously
Menu