GeeCON Prague 2014*
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


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: 3222
    
    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
 
GeeCON Prague 2014
 
subject: JSP and coookies