you can add and get cookie using HttpServletResponse, HttpServletRequest
In
JSP,
1. you can add cookie using
response implicit object.
2. you detach cookie by setting maxAge(maximum time).
3. you can get the added cookie using
request implicit objects.
Cookie[] cookie = request.getKookies();
4. you can replace cookie with using key with different value (which will replace cookie with new value).
hth,