HTTP Status 7XX

Ever wanted to return obscure HTTP Status codes from your Jersey REST application?

Now you can easily get all HTTP Status codes from the 7XX ranged as proposed by some people at RailsCamp ( see spec ) just grab the status codes from here at github or pull em in as maven dependency with


You can just send it with Jersey’s response like¬†return


I know that Tomcat will not send the reason phrase. By default tomcat does not allow to set custom messages for statusses. To get tomcat to send the custom message you have to add a parameter at startup set


and you will have the status message in your response.

I haven’t tested with other containers yet.

Have fun with 7XX !

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.