Change the method return type to Response and use ResponseBuilder to
build the response. E.g.
@GET
Response someMethod() {
SomeJaxbClass obj = ...
CacheControl cc = new CacheControl();
cc.setNoCache(true); // etc
return Response.ok(obj).cacheControl(cc).build();
}
On Sep 2, 2009, at 3:22 PM, Moiz Dohadwala wrote:
> Hi,
>
> How does one set cache (and other ) response headers from a @GET
> method that is returning a JAXB object?
>
> Thanks,
>
> -Moiz