I thought you weren’t supposed to do that when using the built-in WebApplicationExceptions ? According to the API docs for WebApplicationException they should do the trick:
Runtime exception for applications. This exception may be thrown by a resource method, provider or StreamingOutput implementation if a specific HTTP error response needs to be produced. Only effective if thrown prior to the response being committed.
But as I said: they don’t in most cases.
---
Steven Van Impe
Lecturer @ University College Ghent, Belgium
[Follow @svanimpe]<https://twitter.com/intent/follow?screen_name=svanimpe>
http://asipofjava.blogspot.com/