File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Cookies!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Cookies!!!" Watch "Cookies!!!" New topic
Author

Cookies!!!

T Rai
Greenhorn

Joined: Apr 16, 2002
Posts: 20
hi all,
i am trying to use cookies in a JSP to track requests associated with a user. The browser stores the cookies in the client machine, normally in a Cookies Folder in Document and Setting in C:\. is there any way that i can specify a particular place to store such cookies?
Another question is about cookies' definition that A cookie is a piece of text that a web server can store on a user's hard driver.I am having difficulty understanding how a web server can store a cookie on a user's hard driver? I read that a client sends the cookie information sent by a server and stored in the client machine. now how does the client browser store that cookie information sent by the server and how does it access again and send it to the server? could you please explain me this mechanism?
thanks.
[ October 20, 2003: Message edited by: Thulung Rai ]
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
you as the webpage cannot determine where the cookie is stored because that would be bad security
what happens with cookies is your webpage sends the cookie back along with the webpage to the users browser. depending on which browser the user is using and what their preferences the browser may accept or decline the cookie. the browser will store the cookie wherever it wants. If it is a cookie just for one session it wont need to store it on the harddrive because it can keep it in memory but if it is for say 30 days some browsers store it as small text files on the users PC. when the user requests another page from the same site the browser does send along any cookies for that site.
hope that explains stuff better


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cookies!!!