I've implemented it via the ThreadLocal method I describe below, and it works well enough.

I still feel like this is a bit of a kludge though... If anyone has a more elegant solution, I'd love to hear it.

Thank you,

-Steve

On 3/12/2010 10:46 AM, countz...@cyberdeck.org wrote:
I'm able to retrieve cookies by over-riding doPost() in my
XmlRpcServlet and reading them from the HttpServletRequest, but I'm unable to
figure out the best method for adding cookies to the outgoing response.

I particularly want to be able to add them inside my Handler.

The only way I can think of is to setup a ThreadLocal in my servlet that
houses the HttpServletResponse passed to doPost, and then accessing that
in my Handler, but that seems extremely kludgy.  I'd rather be able to
override some "processResponse()" type method in my servlet and muck about
with the response there.

Any best practices for this?

Thank you,

-Steve

Reply via email to