So when I work with HttpSessions in order to limit access to some pages that require authentifications or to retrieve informations, I usually use:
HttpSession session = request.getSession() ;
session.setAttribute("username",username) ;
Then I was reading about filters and sessions I found that people SessionMap and I was confused about the difference between them and their use cases. And also, a random question, can I store an object in a session, like the list of products since I know the chances of changes made to the database are not that frequent, and that way I reduce the time for queries. Thank you !
Aucun commentaire:
Enregistrer un commentaire