Re: set-cookie

2010-05-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/24/2010 3:55 PM, Caldarale, Charles R wrote: From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like System.out.println(Thread.currentThread().getStackTrace()); What you got was a display

Re: set-cookie

2010-05-26 Thread Kris Schneider
On Wed, May 26, 2010 at 2:04 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/24/2010 3:55 PM, Caldarale, Charles R wrote: From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like

RE: set-cookie

2010-05-26 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: set-cookie Thread.currentThread().dumpStack(); Or the more traditional: new Throwable(Stack Dump).printStackTrace(); And if we look inside java.lang.Thread, we find: public static void dumpStack

RE: set-cookie

2010-05-25 Thread banto
great guys for a great forum!!! n828cl wrote: From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like System.out.println(Thread.currentThread().getStackTrace()); What you got was a display of the array object - not very interesting. Either iterate

Re: set-cookie

2010-05-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Banto, On 5/22/2010 12:01 PM, banto wrote: Hi Chuck, i have found out who is generating that in my code: dispatcher.forward(request, response); the response contains also the set cookie header...it is automatically done by tomcat... You

Re: set-cookie

2010-05-24 Thread banto
chris, useful info. however when i print the current thread stack trace with a HttpSessionListener i see few info; something like this Ljava.lang.STackTraceElement;@4313455 i´m using something like System.out.println(Thread.currentThread().getStackTrace()); in the sessionCreated(). any

RE: set-cookie

2010-05-24 Thread Caldarale, Charles R
From: banto [mailto:banto...@gmail.com] Subject: Re: set-cookie i´m using something like System.out.println(Thread.currentThread().getStackTrace()); What you got was a display of the array object - not very interesting. Either iterate through the array, displaying each entry, or just do

RE: set-cookie

2010-05-22 Thread banto
..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

RE: set-cookie

2010-05-22 Thread Martin Gainty
] 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

RE: set-cookie

2010-05-22 Thread Caldarale, Charles R
From: banto [mailto:banto...@gmail.com] Subject: RE: set-cookie ..then where the set-cookie come from if not from the line getServletContext().setAttribute(products, products);? That's part of the init() method, called when the servlet initializes, not when it's processing a request

RE: set-cookie

2010-05-22 Thread banto
Hi Chuck, i have found out who is generating that in my code: dispatcher.forward(request, response); the response contains also the set cookie header...it is automatically done by tomcat... n828cl wrote: From: banto [mailto:banto...@gmail.com] Subject: RE: set-cookie ..then where

RE: set-cookie

2010-05-21 Thread Caldarale, Charles R
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

RE: set-cookie

2010-05-21 Thread Caldarale, Charles R
From: banto [mailto:banto...@gmail.com] Subject: set-cookie Now the code is something like: public class FrontController extends HttpServlet { public void init() throws ServletException { HashMap products = new HashMap(); Product p = new Product(1,