Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use ckookie in jsp

 
hicham rho
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"hichambox",
Thanks for participating here at the Ranch. However, the name you are using does not comply with the naming convention described at http://www.javaranch.com/name.jsp . 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.
Thanks.
Sean
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this tutorial here:
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Cookies.html
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
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the pros and cons of using cookies over sessions? can they used for the same purpose?
 
hicham rho
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
regards
maulin
 
sharad goswami
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic