File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes We are into serious Cookie business- HFSJ and Cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic
Author

We are into serious Cookie business- HFSJ and Cookies

kunal Jaggi
Greenhorn

Joined: Sep 16, 2003
Posts: 17
We are into serious Cookie business

I have just started reading HFSJ book. The book I indeed good but it fails to explain the Cookie features completely.

I wanna know, that how can we make a Cookie exist on the client machine for ever. The setMaxAge(int secs) method just makes it alive on the client for the specified period. But, how do I go about persisting it on the client machine.

Also, I now that somewhere there�s a folder called �cookies� in my Windows OS. I hope it�s this folder where all my cookies are stored?

Rgds,
Kunal Jaggi
SCJP
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

You can't. If you could, everyone would try it and your browser would overflow with cookies!

The best you can do is set the max time to a very high number to keep the cookie around for a very long time. If you need to store a value forever, you might want to consider storing it in a DB instead of a cookie.

Hope this helps. Since your question is not a topic covered by the exam, I'm going to close this thread. Please try to keep your questions within the scope of the SCWCD objectives. If your curiosity causes you to wander from the objectives, we have other forums at the ranch for that.


A good workman is known by his tools.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: We are into serious Cookie business- HFSJ and Cookies
 
Similar Threads
Cookies and URL encoding
opening two tabs
sessionId
Using Cookies . Is it Safe ?
Cookies!!!