This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JSP and the fly likes Help Needed Urgently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Help Needed Urgently" Watch "Help Needed Urgently" New topic

Help Needed Urgently


Joined: Jul 15, 2003
Posts: 1
Hello everyone!!
I am new to java,as such having problems in coding.Hope you all will be there to help me
Right now i am facing a problem in processing cookies with JSP.
I have to take username and password from a form and store them in cookies and read from the cookies on the other page. and a delete button which deletes the cookies.
I am getting a null value for the username and password after i kill the browser and open the page in new browser.
If someone comes up with the complete code immediately, it will be a great help and highly appreciated!!
kalpana Kumar
Ranch Hand

Joined: Jul 03, 2003
Posts: 65
Hi syed,
By default cookies expire as soon as the user exits the browser application.
So u have set the age of the cookies. using setMaxAge(name)-this sets the time remaining(in seconds) before the cookie expires.
Hope this helps U out
jQuery in Action, 2nd edition
subject: Help Needed Urgently