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

How to use ckookie in jsp

hicham rho

Joined: Jul 04, 2002
Posts: 3
i want know how ti use cookie in jsp to make a scure transaction betwen client and server into firm intranet thank you
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Thanks for participating here at the Ranch. However, the name you are using does not comply with the naming convention described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name (not fictitious monikers). Please log in with a new name which meets the requirements.
chanoch wiggers
Ranch Hand

Joined: May 24, 2001
Posts: 245
try this tutorial here:
but cookies wont make it secure, you know - they will just help give you more confidence that the user is who he says he is. To make a secure system, why not use the built in security in your web server, eevrything can be automated from log in, to SSL for real security, and so on

chanoch<p><a href="" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
what are the pros and cons of using cookies over sessions? can they used for the same purpose?

I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
hicham rho

Joined: Jul 04, 2002
Posts: 3
hello all,
right now, if i want save data how i like to use after in data base oracle in some hastable every field in my frame i save it in hashtable so i want to use cookie to save my data
thank you
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1873
hi andres,
there isn't much like pros and cons if follwing is the true story...
"session uses Cookies internally to store session data".
here i pose anther question then,
i don't know how far is the above sentence is true but i'm really confused about this as otherwise how else session can store information that persists throughout the session? i know URL Rewriting is another way of handling of sessions but how then we write a code that automatically switches b/w cookie and url re-writing methods depending upon whether the client has enabled/disabled cookies (or is it possible to have sessions managed by URL REwriting internally?)
for the url rewriting switching on cookie's disability - i guess we will just try to write a cookie and then read it. if we can't read it back then that means the cookies are disabled and in that case i switch to URL Rewriting.... am i right?
to check if the sessions are based on the Cookies internally or not- we can put something in session. diable the cookies on the client side. try to get back the session data. if we get it back then its not using Cookies internally. if we don't get the data back then we may derive that session is using Cookies internally.
please somebody throw some light on my thoughts...
sharad goswami
Ranch Hand

Joined: Jan 18, 2001
Posts: 51
Dear friend;
Cookies is one way of session tracking but jsp has in built support of session tracking which is done by session use them.

Stop The World I Want To Get Off.
I agree. Here's the link:
subject: How to use ckookie in jsp
It's not a secret anymore!