This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3700

Only 1 type. String value/pairs.

My Blog: Down Home Country Coding with Scott Selikoff
Ulf Dittmer

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

Ping & DNS - my free Android networking tools app
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.
jQuery in Action, 2nd edition
subject: on Cookies
Similar Threads
Session sharing (JSP-PHP)
handling next and back buttons in javascript
WA #1.....word association
can anyone tell me how to make a authentication with jsp & servlet
remember user password in jsp/java