how is this "Remember my ID" works

hi, curious to know how is this features work. I meas is using session or cookies? what is the different of the cookies and session?

can share some sample code of how to handle this properly.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Difference between cookies and session:

how to use cookies:

Session is a way of maintaining a state in HTTP (State less) paradim.
As HTTP is a stateless protocol, every request is handled independently having no information about previous request.
Session is a way by which state of a user can be saved between consecutive requests.
Cookie is a way by which session can be implemented. Cookies are text files which are sent from the server to browser and returned from browser to server. There are other ways like URL rewriting and hidden form fields by which sessions can be maintained.
For more details:;sid=2002/9/15/01845/1179


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It defintely uses cookies in your browser. To test this, do this:

Go to one webiste and use "remember my id" function. Then go to option menu to clear all cookies. Go back to the website you will see that id is not remembered any more.

JSP or servlet have a built-in API to handle all cookie functions, look at this:

Enjoy :)
sorry, provided repeated link. here are some new ones:
didn't split it...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.