• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting Cookies in Java or JavaScript

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently studying the subject 'Cookies' and up to now I am a bit confused.
My group and I are about to create a site that will use solely jsp pages. In it I am in charge of the cookies.
The teacher intructed us to use JavaScript for that but I found out that it can be done using varied scripts or programming languages. Would anyone be able to tell me which would be the best solution? I intend to keep the date on the client-side.
Thanks
Saulo
[ March 26, 2003: Message edited by: Saulo Menezes ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Javascript to manipulate cookies on the client (browser) side. Javascript is the only client side scripting language with wide support. Note that Javascript has practically nothing to do with the Java language.
On the server side you have to use the Servlet and JSP APIs to manipulate cookies.
Bill
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
To be more explanatory, if u want to store and user information on the client side u go in for cookies.If u want to store any user information on the server side u go in for session objects.
With respect to cookies u can create it on the client side using javascript as well as on the server side using JSP or servlets.
As ur cookie is however going to be stored in the client machine its better to create in client side as creating it on the server side involves an extra overhead of sending that cookie with the response object
Cheers
Geeta
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic