How can I close a specific session if i have several session open as follows:
String userName = (String) session.getAttribute("userName");
HashMap cartList = (HashMap) session.getAttribute("cartList");
If i want to close the session of cartList, what code should i use?
I tried using the following:
session.invalidate()
but it closes everything.session.removeAttribute("cartList");
it didn't close my session.