Creating Web Services# Custom Exception Message# Response response = Response.status(Response.Status.FORBIDDEN) .entity("Invalid password").build(); throw new WebApplicationException(response); References# Java(TM) EE 7 Specification APIs Java Web Container