I've done Web application programming using servlets/JSP, but I'm new to desktop programming. In Web apps you have this thing called the "Session" which represents one user's session of interacting with your app. You can store values in the "session". You could do this...
HttpSession session = request.getSession(true);
session.putValue("thisUser", s_username);
Then the user does a bunch of stuff and it's minutes later and you need that value again, you can do this...
s_username = (String) session.getValue("thisUser");
My question is, what is the corresponding mechanism in desktop programming?
My thought was to use the main JFrame object to store data like that. Then as long as the app is running that JFrame exists in memory and I can update and retrieve those variables in response to user input.
Is that the way it's normally done? Or is there a better way?
Thanks,
E