Add Response Header to JAX-RS Webservice

后端 未结 1 1908
南旧
南旧 2020-12-29 08:17

I am trying add some response headers to some of my webservice calls. I wrote my webservice using CXF 2.1.2 and JAX-RS. I need to return an object and I also want to add

相关标签:
1条回答
  • 2020-12-29 08:40

    You can inject a reference to the actual HttpServletResponse via the @Context annotation in your webservice and use addHeader() etc. to add your header.

    0 讨论(0)
提交回复
热议问题