J
JehanNYNJ
The first time the user visits I am saving his information in a cookie
with the following code....
cookie = new Cookie(name, _value);
cookie.setMaxAge(MAX_AGE);
response.addCookie(cookie) .
The next time he visits (new session) I am retrieving the cookie
with....
Cookie[] cookies = request.getCookies();
for (int i = 0; i < cookies.length; i++) {
cookie = cookies;
if (name.equals(cookie.getName()))
return cookie;
}
I put a new value in and save it again with...
cookie.setValue(_value);
response.addCookie(cookie);
The problem is that the app server seems to be deleting the cookie on
the system instead of overwriting it. So the third time he logs in it
does not find any cookie....
Anybody seen this behavior? I am running JBoss 4.
Thanks for any help.
with the following code....
cookie = new Cookie(name, _value);
cookie.setMaxAge(MAX_AGE);
response.addCookie(cookie) .
The next time he visits (new session) I am retrieving the cookie
with....
Cookie[] cookies = request.getCookies();
for (int i = 0; i < cookies.length; i++) {
cookie = cookies;
if (name.equals(cookie.getName()))
return cookie;
}
I put a new value in and save it again with...
cookie.setValue(_value);
response.addCookie(cookie);
The problem is that the app server seems to be deleting the cookie on
the system instead of overwriting it. So the third time he logs in it
does not find any cookie....
Anybody seen this behavior? I am running JBoss 4.
Thanks for any help.