On Dec 14, 2009, at 9:21 PM, Casper Bang wrote:
>
>> You mean the entity, ex.getMessage(), is not received by the client?
> Yeah, Tomcat 6.0.18 just gives me:
>
> HTTP Status 400 -
> type Status report
> message
> description The request sent by the client was syntactically  
> incorrect()
>
> The same is the case btw. if I directly return a 400:
>
>    @GET
>    public Response root(){
>        return Response.status(400)
>                .entity("Bla bla")
>                .type("text/plain")
>                .build();
>    }
>
>
> So I think all is fine with the provider/mapping aspect, but for some
> reason Tomcat overrides with its own 400 handler. I'm using Jersey  
> as a
> filter rather than a servlet.
That should not make any difference.
> Could that have soemthing to say? Not sure
> how to enable Jersey response logging (apart from using a  
> LoggingFilter,
> which doesn't really reveal much).
>
I thought it would allow you to rule out that Jersey was the problem.  
Given that a "normal" 400 response from a resource method also  
exhibits the same behaviour this definitely looks like a Tomcat config  
issue.
As a wild guess i wonder if you should try using a later version of  
Tomcat?
Paul.