A simple application to demonstrate how to expire and destroy Cookies in JSP and Servlets
Step 1 : Create index.jsp
Here index.jsp just transfer control / request to cookies.jsp
Step 2 : Create mystyle.css
Here mystyle.css is just for providing style to JSP page. Things will also work without using it.
Output of the program :
1. Run index.jsp to see the following output :
2. Add few of the Cookies name and value by regular submits
3. Just after 1 min BOOKS cookie gets destroyed
4. After 5 minutes all the rest cookies gets destroyed ...
Step 1 : Create index.jsp
Here index.jsp just transfer control / request to cookies.jsp
|
Step 2 : Create mystyle.css
Here mystyle.css is just for providing style to JSP page. Things will also work without using it.
|
Output of the program :
1. Run index.jsp to see the following output :
2. Add few of the Cookies name and value by regular submits
3. Just after 1 min BOOKS cookie gets destroyed
4. After 5 minutes all the rest cookies gets destroyed ...