Methods in the Cookie API
getDomain/setDomain
Lets you specify domain to which cookie applies. Current 
host must be part of domain specified
getMaxAge/setMaxAge
Gets/sets the cookie expiration time (in seconds). If you 
fail to set this, cookie applies to current browsing session 
only. See LongLivedCookie helper class given earlier
getName/setName
Gets/sets the cookie name. For new cookies, you supply 
name to constructor, not to setName. For incoming 
cookie array, you use getName to find the cookie of 
interest
83
Servlets
www.corewebprogramming.com
Methods in the Cookie API 
(Continued)
getPath/setPath
Gets/sets the path to which cookie applies. If unspecified, 
cookie applies to URLs that are within or below directory 
containing current page
getSecure/setSecure
Gets/sets flag indicating whether cookie should apply 
only to SSL connections or to all connections
getValue/setValue
Gets/sets value associated with cookie. For new cookies, 
you supply value to constructor, not to setValue. For 
incoming cookie array, you use getName to find the 
cookie of interest, then call getValue on the result
84
Servlets
www.corewebprogramming.com
42




  

Home

About Services Network Support FAQ Order Contact
 

Servlet Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved