I want to add some headers to http response from my server. I need to headers to be added regardless of the code(2xx, 4xx, 5xx) that returns the app. I tried to implement javax.servlet.Filter
with @WebFilter
annotation and javax.ws.rs.container.ContainerResponseFilter
with @Provider
annotation, but methods doFilter
and filter
called only when application returns 200 http status code. Is it possible to use filters for non 2xx responses?
I'm using Wildfly 8.2.0 as app server, but I think it's not important
Aucun commentaire:
Enregistrer un commentaire