We help IT Professionals succeed at work.

how is this "Remember my ID" works

xman19
xman19 asked
on
Medium Priority
188 Views
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.
Comment
Watch Question

Commented:

Difference between cookies and session:
http://www.jguru.com/faq/view.jsp?EID=528741

how to use cookies:
http://www.roseindia.net/jsp/jspcookies.shtml

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:
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Session-Tracking.html
http://wp.netscape.com/newsref/std/cookie_spec.html
http://www.kuro5hin.org/?op=displaystory;sid=2002/9/15/01845/1179

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:

http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Cookies.html

Enjoy :)
Acton
sorry, provided repeated link. here are some new ones:

http://www.laszlosystems.com/lps-3.0/docs/guide/cookies.html
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.

OR

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.