Skip to main content

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


Rawat,

WebApplicationException is a javax.ws exception, so you need some part of the ws framework to catch that exception and turn it into 404 response.  So this is more likely to be a jersey bug than a jetty problem.

cheers



On 21 September 2013 04:08, Rawat <geegalrawat@xxxxxxxxx> wrote:
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 ?

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top