marwen Bakkar wrote:I am a newbie in this, you are warned.
What's container-managed authentication?
I am making a site where people will play chess in. I use lobby system via Java Web Start. When a user clicks the launch button, the lobby needs to know what player entered, thus, the user needs to be authentificated. What do I need here to store my users?
Also, for whatever authentification solution adopted, once a user is authetificated and clicks to enter the lobby, how do I pass his username as an argument to the JWS application?
Thanks.
Okay, let's see if I can guess what you are asking about here.
My guess: you have an application which is distributed by Java Web Start. You also have a server which is doing something or other. Your JWS application accepts the authentication information from the user by allowing them to key it into text fields. Then it sends a request to the server for authentication.
But no... you seem to be asking how to pass a user name from the server to the JWS application. Whose user name would that be then? I'm confused. And you certainly wouldn't pass it as an argument of the JWS application, at least not one of the arguments of its static main method. The application is already running so that method was already called long ago.
I'm also guessing this "lobby" thing is on the server. If that's the case, and if as it appears from your original question that it's a servlet-based application, you would store information about the application (such as a list of users online) in the servlet context.
My final guess: there are cases where User A needs to know of the existence of User B. In that case you're writing something like a chat application with a server. The fact that the application happens to be distributed by JWS is irrelevant there. Just write the chat application in the usual way.