We help IT Professionals succeed at work.

how is this "Remember my ID" works

xman19 asked
Medium Priority
Last Modified: 2010-04-01
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.
Watch Question


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:

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
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...
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.