aspose file tools
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 Meteor in Action this week in the JavaScript 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