• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cookie.setMaxAge() doesn't work?  RSS feed

 
Michael Brewer
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, cookies should be ultra simple to write and retrieve. For some reason, I'm evidently not doing it right. The code I wrote is below:
I use Mozilla to develop my sites because it has neat tools like the cookie manager that help me out. So, if I look at the cookie manager in Mozilla, it tells me that the cookie is set to expire "at end of session." It does, in fact, do this.
I obviously did something wrong. Can someone tell me what I should do?
[ February 21, 2003: Message edited by: Michael Brewer ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many cookies are there with the name "userName"?
If the cookie has a different path or domain, it will be treated as a different cookie.
try deleting all cookies.
I have a few utilities that I use for stuff like this.
This forum would not let me post my code sample. I got an error message:


Sorry, your post appears to have an illegal HTML tag. Often this is because the post contains a "<" character instead of the equivalent HTML escape sequence "<"
You can fix this by replacing every "<" in your post with "<".
The specific error message is: COOKIE
� Please use your browser's back button to return.



Try to print all cookies to the JspWriter instance, out, by using a for loop.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we had this problem before, right Garrett?

I forget.. did I ever get an answer for you?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!