users@jersey.java.net

[Jersey] Re: Question about returning 404

From: Steven Van Impe <steven.vanimpe_at_hogent.be>
Date: Fri, 20 Sep 2013 07:25:30 +0000

Hi Rawat,

I have the same issue and believe this is a bug:
https://java.net/jira/browse/GLASSFISH-20699

Maybe I should file it with Jersey as well.

You can work around it by not using an exception, but returning a status object directly, something like:

return Response.status(Status.NOT_FOUND).entity(“No data found”).build();

---
Steven Van Impe
Lecturer @ University College Ghent, Belgium
[Follow @svanimpe]<https://twitter.com/intent/follow?screen_name=svanimpe>
http://asipofjava.blogspot.com/