Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create Cookie and display the Cookie values.  RSS feed

 
sandya patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
thank you for your help in the prev question. well, now i am stuck with Cookies. I need to create a cookie using servletsand store the values like name, handle etc. then i should display the values of cookies by invoking another servlet. Iam able to store the values but failing to display the same in another servlet. pls help me
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done so far?
Where are you stuck?
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes a detail will always expedite solution

Shailesh
 
sandya patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created two servlets
one for acceptting and storing the cookies, one for displaying the cookie values. iam able to store the values, but its not displaying the values
in the second servlet. i think some thing is wrong in second servlet i guess.
 
sandya patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code i used for two servlets



ps:I used Cookies but i replaced here with Kookies inorder to accept my post.
can please check this and let me know which is wrong here
 
sandya patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

the same is working fine on my friend's system. mine is not. basically it is not showing the values of cookies stored
someone reply me
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are some basic debugging steps that I would follow:

Loop through all the cookies and print their names to stdout.
Check your browser to see if the cookie has been written to it.
Install LiveHttpHeaders into the Firefox browser.
This will allow you to see all the headers being passed to and from the client. You'll be able to see the cookies that way.
See if your browser is configured not to accept cookies.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!