> From: makaira nigricans [mailto:liame.e...@yahoo.com] > Subject: RE: Tomcat in-memory (session) cookie > > And is there in-memory cookie which generates on every get > and post request?
First, let's do the terminology: there's no such thing as an "in-memory cookie". A cookie is just a piece of information passed back and forth between a client and a server that preserves state information for an otherwise stateless connection. Clients (browsers) usually persist cookies on disk, but Tomcat and webapps running therein don't know or care about that. What Tomcat keeps track of is the HttpSession object, one attribute of which is the JSESSIONID value. > Or add more values to this cookie? To repeat: it's not a cookie, it's an HttpSession object. If you look at the servlet spec and the API doc for HttpSession, you'll see the setAttribute() and removeAttribute() methods, which you may utilize as you see fit. If you want to send additional cookies to the client, you'll need to use the addCookie() method of HttpServletResponse, again documented in the spec and API pages: http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/index.html > You said that through the HttpSession object I can access > the cookies No, he said you can access *attributes*, not cookies. > Does this means that I can add more values to > JSESSIONID cookie?! No, but you can add more attributes (names and values) to the *session* object. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org