This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP and coookies" Watch "JSP and coookies" New topic
Author

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...
Tom.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3226
    
    5
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: http://aspose.com/file-tools
 
subject: JSP and coookies
 
It's not a secret anymore!