Hi!

I have a strange problem with Cookies - I'm realling getting crazy :-(

Anyway, it worked all fine - I just set a simple cookie for user tracking:

Basically what i do is:



           Cookie c = new Cookie("ICC", fd.get("username").toString() );

          c.setMaxAge(604800);      // expires after one week

          res.addCookie(c);

          res.sendRedirect(d.appURL + "ICDesk");


I don't call any res.getWriter() etc. before that code

The problem is that the cookie is not "saved" in Netscape. It works fine
as long as NS is open (so NS seems to somehow cache, but not save the
cookie -
it doesn't work with IE) which means I can retrieve the cookie in other
routines.
As soon as NS is closed, the cookie is lost. I can see that it is not save
in the cookie file from NS.

The strange thing is that it worked fine for a  time and stopped working a
week ago. I didn't
even touch the cookie code! that's what makes my crazy! And I'm 99,99% sure
not to sent any
HTTP headers before I set the cookie. Has it something to do with the
redirect?

Any hint saves my sanity ;-)

Thanx

Oliver








Mit freundlichen Gr��en

Oliver Pistor

-----------------------------------------------------------------------
Oliver Pistor
dsa Solutions
Pf�lzer Str.6
69123 Heidelberg

Tel.: 06221 839 513
Mobil: 0172 761 9365
Fax: +49 6221 472675

[EMAIL PROTECTED]
http://www.dsa-solutions.de

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to