RESTEasy ignores the response set on HttpServletResponse in EAP 5.1

Solution Verified - Updated -


We would like to change the server response using the HttpServletResponse injected in our JAX-RS resource. Here is an example code:

public class TestResource {
    HttpServletResponse theResponse;

    public String test(@Context HttpServletRequest theRequest) throws Exception {
        return "hello";

But RESTEasy is ignoring the response code set on HttpServletResponse object. What am I doing wrong?


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In