|
Hi, gurus,
I searched this archive, but didn't find the
answer.
I want to update the cookie which is added when
the user first logged on using the following code, but it has no use, can
anyone tell me why.
Cookie cs[] =
request.getCookies();
if (cs != null) { for (int i=0; i<cs.length; i++) { if (cs[i].getName().equals("CookieID")) { bFind = true; cs[i].setValue(String.valueOf(new Date().getTime())); cs[i].setComment(String.valueOf(new Date().getTime())); cs[i].setMaxAge(60*60*24); break; } } } Thanks in advance.
Jianhong
|
- Re: Cookie Update Jianhong
- Re: Cookie Update Chris Pratt
- Re: Cookie Update Jianhong
