JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Persistent Cookies Stored on Hard Disk
This section describes what are persistent cookies - cookies that are stored in files on hard disk. Persistent cookies will be sent back to the server when open the browser again later.
There are two kinds of cookies: persistent cookies and temporary cookies.
A persistent cookie is a cookie stored as a file on your computer, and it remains there when you close Internet Explorer. The cookie can be read by the Web site that created it when you visit that site again. You can use cookie.setMaxAge(s) to set the cookie to be persistent for 's' seconds.
A temporary or session cookie is stored only for your current browsing session, and is deleted from your computer when you close Internet Explorer. You can use cookie.setMaxAge(-1) to set the cookie to be temporary.
Other properties of a cookie object that you can set and get:
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
►Managing Cookies in JSP Pages
Sending and Receiving Cookies in JSP Pages
►Persistent Cookies Stored on Hard Disk
Persistent Cookie Test Example
Space Character not Allowed in Cookie Value
Dumping HTTP Response with Cookies
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet