Hi All,
I am using Jersey framework for my RESTful services.
Each of my resource class inherits a base class, I have few URL parameter validations in place inside my base class, so if I find that a mandatory field is missing in the URL, I want to stop the flow in my base class (i.e. Don't want to go and hit my resource method and return a response to browser from my base class).
Currently I am not able to do that and even if I try like for e.g do something like following to go back to browser with missing param message, it won't and still goes and hit the resource class web service method being called:
return Response.status(Response.Status.BAD_REQUEST)
.entity("Parameter value missing for "+ StringHelper.ArrayToString(requiredParametersValueMissing))
.build();
Any ideas or similar situation being faced by you guys. Input appreciated.
Cheers,
Fahad