This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes JSP and coookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP and coookies" Watch "JSP and coookies" New topic

JSP and coookies

Tom Diamond
Ranch Hand

Joined: May 10, 2001
Posts: 98
Hello people,
I am working on a JSP project and I want to use cookies (to handle user login and logout). But when I update a cookie from a page (aCookie.setValue("something")), the other pages seem to load the old one. What could be the problem?
Any advice would be helpfull...
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
Setting the value is not sufficient. You have to ADD the Cookie to the ServletResponse.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: JSP and coookies
Similar Threads
View the images as four per row instead of long row that is never ending
write javascript function in java ?
passing Enumeration as an Attribute from servlet to jsp
how to set up a navigaeting tree according to the database records?
open excel file