From the course: Java EE 8: Web Services

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Validation in JAX-RS

Validation in JAX-RS - Java EE Tutorial

From the course: Java EE 8: Web Services

Start my 1-month free trial

Validation in JAX-RS

- [Instructor] I have a fully functional web service and now I need to protect it from bad input. Validating that the data that supply to the rest resources meets my expectations. You know how it is, someone sends a null where they shouldn't, an alphabet where they expect a number. That sort of thing. To defend this web service from bad input, I'm going to use Bean Validation API and some of its newer features in Java EE8. The Bean Validation API is really a specification onto itself. It's available for integration in any Java application, in any platform. Java EE or Java SE. Let's quack on, shall we? Now for my Glassfish slash Payara server viewers, you don't need to configure the Bean Validation dependency. It shifts with the Glassfish and Payara application service. And it's pulled in as part of the build in materials that I have configured in the pom between line 63 and line 67. between line 63 and line 67. For…

Contents