Code Fragments Program Listing Preface Students in Prof. Baldwin's Advanced Java Programming classes at ACC will be responsible for knowing and understanding all of the material in this lesson beginning with the spring semester of 1999. This lesson was originally written on March 17, 1999. The sample program was tested using servletrunner both from the same machine, and from a different machine on the network. This is one of a series of lessons designed to show you some of the ways to implement session tracking using servlets. The purpose of the sample program in this lesson is to illustrate session tracking through the use of cookies .
Cookies are information stored on the client machine by the browser.
Under certain conditions, this information is sent to the HTTP server whenever a request is sent from the client to the server Cookies are widely used by various server-side programming techniques for the purpose of implementing session tracking. Java provides classes and methods designed to allow you to use cookies in your servlets. By default, cookies are sent only to the host that caused them to be saved. Methods can be invoked to set attributes for each cookie that determine which servers will receive the cookie. By default, cookies are sent to the page that set the cookie and to all the pages in that directory or under that directory.