Hi everybody!
I have a web application that needs to store some information in the session for the current user, eg. username, dob, address. One way of doing this would be storing each value as
session.setAttribute("username","xyz")
and then retrieving the info by session.getAttribute("username").
Another way would be creating a WebUserBean class that has member variables
String userName, dob etc and storing it as
session.setAttribute("webuser",new WebUserBean(xyz,dob)).
Which of these methods will use less memory/resource? or which will give better performance?
Thanks,
Martin