permaculture playing cards*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and coookies
 
Similar Threads
View the images as four per row instead of long row that is never ending
how to set up a navigaeting tree according to the database records?
passing Enumeration as an Attribute from servlet to jsp
write javascript function in java ?
open excel file