Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Keep track of user using HttpSession or Stateful session beans  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some clarification please. I want to know what is the most efficient way to keep track of who is currently interacting with my application. I know this can be done with stateful session beans, and i just save the client information in a variable(s), then access them when i need it. But, i want to know what is the most efficient way. Ultumately i just want to keep their name(to display as "Welcome [name]" on tope of the webpage), and their id( to use to acces the Database when they request information.) Stateful session beans seem like a waste of memory to just save such little information for a whole session. Is HttpSession safe first of all? Someone wont come and steal someone's id persay? So, what is best suited for this?-------If there are other technology more suited for this purpose, i wouldn't mind knowing about it either(if you mention it, i will read it, lol.)

Thank you.
 
author & internet detective
Marshal
Posts: 38249
623
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, HttpSession is safe and the traditional way to track this information.
 
Destroy anything that stands in your way. Except this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!