• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Cookie.setMaxAge() doesn't work?

 
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 ]
 
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.
 
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?
 
Looky! I'm being abducted by space aliens! Me and this tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic