I have a web app that shows a list of online users. The user may select one other user from that list to connect to, which, brings it to a new page. This new page will be where the users "connect" (using WebRTC). For my connection method I need the user ID from both users. I have obtained these ID's in the one page. My problem is I need to pass these ID's to the next page. Some methods I thought of include:
- Database table containing both users. Then I can access either through an ajax call to a REST Web Service or through a backing bean.
- Passing variables to some form of local storage.
- Passing the variables into the URL somehow.
- Use AJAX to change the view to next page view (entire view change?)
But I'm not sure if there's a better way to achieve this. What would be the most efficient way of knowing which user they selected (by using their ID's) so they can connect within the next page?