users@jersey.java.net

[Jersey] Re: Response headers gets removed using HttpContext

From: charlesk <charlesk40_at_yahoo.com>
Date: Mon, 8 Aug 2011 09:16:31 -0700 (PDT)

I think below addresses the same issue I'm having.
http://jersey.576304.n2.nabble.com/setting-headers-td4789091.html

I've looked in the code more and looks like we have couple of options here
as if you return an object that is not a Response, then the new Response
gets created (i.e what ever you have set in the HttpContext is removed)

1. return a Response from your resource method (this changes my method
signatures though)
2. Use ContainerResponse filters (This may preserve method signature)

But, I'm still not sure the exact usage of HttpContext in respect to setting
headers and where it should be applied.



--
View this message in context: http://jersey.576304.n2.nabble.com/Response-headers-gets-removed-using-HttpContext-tp6650678p6664863.html
Sent from the Jersey mailing list archive at Nabble.com.