The problem seems to be with EhCache and running a
SimplePageCachingFilter in front of Jersey. I suppose I should've
checked this aspect before. In my opinion a response is a response,
whether it has status 3xx or 4xx - so I will log the issue with the
Terracotta developers.
Thanks for feedback,
Casper
Paul Sandoz wrote:
>
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>