//if we reached here, no exception, cookie is valid the header name is Set-Cookie for both "old" and v.1 ( RFC2109 ) //RFC2965 is not supported by browsers and the Servlet spec asks for 2109.
//in any case the cookie is added to the response header with Set-Cookie keyword as seen here Response.addHeader("Set-Cookie", string); ? Martin-- ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sat, 22 May 2010 01:15:15 -0700 > From: banto...@gmail.com > To: users@tomcat.apache.org > Subject: RE: set-cookie > > > ..then where the > > set-cookie come from if not from the line > getServletContext().setAttribute("products", products);? > > actually i added this line to another servlet but no > set-cookie header is sent? > > thanks > > n828cl wrote: > > > >> From: André Warnier [mailto:a...@ice-sa.com] > >> Subject: Re: set-cookie > >> > >> // Store products in the ServletContext > >> getServletContext().setAttribute("products", products); > >> > >> Presumably, if you store something in the context, it is because you > >> want to retrieve it later (or else, what's the point he ?). > >> Now, Tomcat has no way to know when you'll come back to retrieve it, so > >> it has to create a session to store this. > > > > Nope, that's not it (but I don't know what is, yet). Attributes stored in > > a ServletContext have a webapp, not session, scope; no session is needed > > here, and nothing needs to be communicated between the client and server > > to retrieve them. > > > > - 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. > > > > > > > > -- > View this message in context: > http://old.nabble.com/set-cookie-tp28639362p28641797.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2