Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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
Sheriff
Posts: 38555
653
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!