Link to home
Start Free TrialLog in
Avatar of InNoCenT_Ch1ld
InNoCenT_Ch1ld

asked on

is session a good way to handle user login?

hi, in my application, i handle the user login using session. if the user login successfully, i will add an session attribute "id" for the user name. eg:

session.setAttribute("id", userName);

and when the user logout, i will have the attribute removed... but i read in some books they said that creating too many session will occupy memory of the server, and i was thinking, does this means it is not a good practice??

can any experts kindly drop some tips/hints or links that might help me in designing the login/logout for my application.. tks



ASKER CERTIFIED SOLUTION
Avatar of seopher
seopher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of InNoCenT_Ch1ld
InNoCenT_Ch1ld

ASKER

Tks for the respond seopher and TimYates, I am really new in JSP/Servlet so some advice from experts is very much needed ;-)