| Author |
Testing Cookies
|
Nabila Mohammad
Ranch Hand
Joined: Nov 05, 2007
Posts: 661
|
|
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.
|
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: 244
|
|
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.
|
SCJP 6 [SCJP - Old is Gold]
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Testing Cookies
|
|
|