File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes on Cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "on Cookies" Watch "on Cookies" New topic

on Cookies

amit bhadre
Ranch Hand

Joined: Jan 23, 2006
Posts: 124
How many types of Cookies are there in servlets?

thanks in advance....

amit bhadre

Thanks advance who ever answers this question.

amit bhadre
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Only 1 type. String value/pairs.

[OCA 8 Book] [Blog]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
What do you mean by "type of cookie"? The javadocs mention that both Netscape-style cookies and RFC2019-style cookies are supported.
subbarao N.V

Joined: Aug 21, 2006
Posts: 13
Two types of cookies

Temporary: These cookies will be deleted from your browser you close the browser

Permanent: These cookies will be there after closing the browser.

Because for cookies, They have the name,value,age. If you set the age for the cookie, that will be there until the age==-1. Because the default age for cookie is -1.These type of cookies will be closed, when ever we close the browser.
I agree. Here's the link:
subject: on Cookies
It's not a secret anymore!