Cookie Handling in Java
An Introduction |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
Cookie
headerSet-Cookie
headerCookieHandler
get()
gets all applicable cookies from the cache
put()
sets all applicable cookiesset()
is a static method that sets the universal
cookie handler for all subsequent HTTP connectionsCookieManager
CookieStore
to save/retrieve the cookies
CookieStore
CookieStore
(and probably Runnable
for reasons discussed below)
Runtime.getRuntime().addShutdownHook()
and pass it a Thread
(with an associated
Runnable
)