• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Testing Cookies

 
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic