File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Testing Cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Testing Cookies" Watch "Testing Cookies" New topic

Testing Cookies

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
I am trying to run a simple program to test cookies .
I have a form.html in which takes user input ( via and passes it on to a jsp (cookieresult.jsp ) which inturn passes on to another servlet ( .

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.



And finally


The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

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

SCJP 6 [SCJP - Old is Gold]
I agree. Here's the link:
subject: Testing Cookies
It's not a secret anymore!