If the user comes back to the page after having entered a username, check if
the value of the textbox and the value contained in the cookie, if they are
the same do not do anaything, else remove the first value from the session

session.removeValue (username);

then redeclare the value of the session with the new username, then when you
will access, I think they will not be any problem, in fact you just have to
try, I am not sure of the result.

-----Original Message-----
From: Shrikant Amale [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 7:34 PM
To: [EMAIL PROTECTED]
Subject: Problem using Cookie and Session Variables


Hi all Servleters,

  I am new to Cookies and Session Variables,
i am facing a problem using both. I have created
a logon screen i am accepting username and password
from it. when submitted i am storing username in a
cookie after validation, I am reading value of cookie
from another servlet (it works fine for first time),
but when i go to previous page I change username, the
servlet for validation gets called on submitting and
it stores the value of username into cookie, but this
time i get the old value from the cookie when i read
it from the other servlet.
I tried the same with Session Variables and I am
getting always the old value.

What can be the problem?

Please help me. if possible provide code also.

Thank you in advance

Shrikant

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

___________________________________________________________________________
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

___________________________________________________________________________
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