Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

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.
0
xman19
Asked:
xman19
  • 3
1 Solution
 
el_diosCommented:

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

0
 
gksinghietCommented:
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

0
 
actonwangCommented:
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
0
 
actonwangCommented:
sorry, provided repeated link. here are some new ones:

http://www.laszlosystems.com/lps-3.0/docs/guide/cookies.html
0
 
actonwangCommented:
didn't split it...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now