users@jersey.java.net

[Jersey] Question about returning 404

From: Rawat <geegalrawat_at_gmail.com>
Date: Thu, 19 Sep 2013 17:10:15 -0700

Hi All,

I am using Jersey 1.14 and in my Servlet POJO i am trying to return 404 to
the client

if(respMap == null) {
         throw new WebApplicationException(new Exception("No data found"),
404);
}

But client received 500. Can anyone copy paste some sample code to return a
standard http status code ?