If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

where YourCookieName is the name of the cookie which you use to distinguish it from any other cookie the user has, and YourCookieValue is the value you want the cookie to store. To check if a particular cookie exists you have to loop through the array of cookies you got from the HttpServletRequest object, and if there is a cookie with the name that you're looking for then it exists. To get the name of a cookie you use the getName() method. The cookie isn't stored anywhere when you create it, it exists just like any other object you create. To store the cookie on the users computer you need to add it to the response object using the HttpServletResponse method addCookie(someCookie). This will store the cookie as a text file on the users computer.