Hi Christian,
You can use the Response.Builder [1] to include your own HTTP headers in
the response. For example:
return Response.ok("content").
header("X-FOO", "foo").build();
Paul.
[1]
https://jsr311.dev.java.net/nonav/releases/0.5/javax/ws/rs/core/Response.Builder.html
Christian wrote:
> hmm sounds like having an HttpServletResponse annotated with resource
> and provided by a per request provider would allow me to modify the
> response on each request am I right ?
>
>
> @Resource
> public HttpServletResponse response ;
>
> sorry to bother
>
>
>
> 2008/1/14, Christian <christian.rivasseau_at_gmail.com
> <mailto:christian.rivasseau_at_gmail.com>>:
>
> Hi
> I cannot figure how to add a response header to the response when
> running in a servlet container ?
> Should I try to have some HttpServletResponse injected in my service
> ? I can't figure how to do this
>
> Thanks in advance
> ,
>
> Christian
>
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109