This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See 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.
[ March 26, 2003: Message edited by: Saulo Menezes ]
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • 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.
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!