File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Creating Server Side Cookie Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Creating Server Side Cookie" Watch "Creating Server Side Cookie" New topic
Author

Creating Server Side Cookie

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 744
How many types of Cookie are there ???
Is there anything like server side cookie and client side cookie If yes than how can i create server side cookie ???


Jigar Naik


William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12265
    
    1
Cookies are always client side. Perhaps you are confused by the existance of the javax.servlet.http.C ookie class - that is simply the class that servers use to manipulate c ookie values during a single request-response cycle. Holding values between requests is handled by the HttpSession - note that a cookie value on the client is what associates a given client with a Session.

For more than you ever wanted to know about c ookies, here is the RFC.

Bill


Java Resources at www.wbrogden.com
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

I don't think that there is anything like server side or client side cookies. It is just the container creates for you when you want to use sesions or you just create one custom cookie depending on what you want to do with it.


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

How many types of Cookie are there ???


Theres chocolate chips, coconut, almond shavings, what ? Oh...

Well there are no server side cookies. Cookies are usually handed over to clients over HTTP so that clients can be stateful. Everytime, the browser says to the server, "Hi server do you remember me ? I am the guy with the JSessionID=blalba!123%^&D". If you dont want to use cookies use HTTPS or URL rewriting.


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 471
Kookie FAQ is here


Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Creating Server Side Cookie
 
Similar Threads
Question on Cookie
Hard-to-guess Cookie values
Add Cookie to request in JSP
Cookies access between sub domains
cookie problem