This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing Cookies

 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to run a simple program to test cookies .
I have a form.html in which takes user input ( via CookieTest.java) and passes it on to a jsp (cookieresult.jsp ) which inturn passes on to another servlet (CheckCookie.java) .

The problem is it's not giving me the value of the parameters which were inserted in the form .html , even though it works fine till the jsp. I just get null values in the last servlet.

I am not very clear with concept to know if I am doing it right , or how it should be done to get the output.

Here's the code.

Form.html




CookieTest.java




cookieresult.jsp




And finally CheckCookie.java





Thankyou.
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ensure if CheckCookie and CookieTest are under same domain... Suppose if you are trying locally and using "localhost", both servlet URL should be under domain "localhost" since Cookie is based on
domain.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic