How can I connect two users so that they can share a common object (game instance) using J2EE web technologies (JSP, Spring, etc.)?

My idea is that player 1 creates the game (for two players), the server returns the URL to him, player 1 sends this URL to player 2, and player 2 opens the URL and connects it to the game.

What is the best and easiest way to achieve this with JSP and related technologies?

+3
source share
2 answers

Map , pathinfo URL- . , pathinfo, Map.

+2

:

  • GameID.
  • , GameID. . .
  • ( bean spring.)
  • URL , JSP.
  • GameID, . = map.get(gameID)

, .

+2

Source: https://habr.com/ru/post/1745601/


All Articles