[Solved] Servlet context is not working
Answer Hashtable.contains() Tests if some key maps into the specified value in this hashtable. So, within your Servlet at this line if(!playerList.contains(playerid)) { you’re actually comparing a key (playerid) with all the values (Player objects) in your Hashtable. Hence, the match is failing every time. Your ServletContext (as well as its listener) works fine since … Read more