tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi sankar <>
Subject Jaxrs Bean Validation
Date Thu, 12 May 2016 03:35:45 GMT
Hi Team,
    public String sayHello(                            @Size(min=6,
max=6, message="Check the Size") 
message="Not a valid PNR") 
                            @PathParam("pnr") String pnr) {
        return "PNR";
    }if I give the input as /hello1/$$$$$$
Returns http status 400 bad request and prints an error HelloWorldResource.sayHello.arg0:
"Not a valid PNR" in the tomee log
Is it possible to return the message "Not a valid PNR"  in the response body along with http
status code of 400.
 I believe  I am requesting a new feature to be added to tomee.
Thanks,Ravisankar Challa

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message