I’m implementing a game in JSP and Servlets. The game should support multiple players.
It is obvious that each player ID is generated on the server side. But where do I store it on the client side, so I can retrieve it later (from within the servlet) when the client calls for the Servlet?
I’m implementing a game in JSP and Servlets. The game should support multiple players.
Share
Sessions are handled automatically by the servlet framework, and you retrieve the session by calling
request.getSession()in a servlet.The session is available in different ways once you start using a framework once you outgrow servlets (this happens quickly) and is framework-dependent.