Add cookie to response

I am trying to add a cookie to the response from vignette portal with this code:

response.addCookie(new Cookie("key",value));

but also the web browser accepts cookies, the client doesn't store the cookie.
What could be the problem? Does Vignette Portal make something strange with cookies?

Thanks!!

Re: Add cookie to response

If you want to set the cookie in the grid, Is it possible that the header of the response has already been written?, so it is too late.

Re: Add cookie to response

I have found the solution, In the Johan Danforth's Blog there is a solution for this. The trick is to obtain the original response, not the vignette wrapped response. Thanks for your post: More about cookies in Vignette Application Portal (VAP)