I have a HashMap where I am putting HttpSession object as Key and HashSet as Value
HashMap<HttpSession, HashSet<String>> map = new HashMap<HttpSession, HashSet<String>>();
I have a HttpSession listener where I need to check weather session object is exist in the Map
public void sessionDestroyed(HttpSessionEvent se) {
HashMap<HttpSession, HashSet<String>> map = //Get map object
HttpSession session = se.getSession();
if(map.containsKey(session)){
//TODO Code goes here
}
}
IF condition always return false, even though session object is available in the map (manually checked the map entries). I am stuck!!!