How to send and retrive cookies?
In JSP, the getCookies() method of the request object returns an array of Cookie objects. Cookies are used to allow web browsers to hold small amounts of information or state data associated with a user’s web browsing. Common applications for cookies include storing user preferences, automating low security user “sign on” facilities, and helping collect data used for “shopping cart” style applications. Cookies are named and have a single value. They may have optional attributes, including a comment presented to the user, path and domain qualifiers for which hosts see the cookie, a maximum age, and a version. The following shows constrtucting a cookie with a specified name and value.