Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Help needed to return 404 using WebApplicationException

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 ?

Back to the top