Using javax.validation with Tomcat7

I am trying to get javax.validation working on Tomcat 7.

Ive hit my WEB_INF / lib: hibernate-validator-4.3.0, as well as slf4j-api-1.7.1 and slf4j-simple-1.7.1.

When I run my code, the verification is simply ignored! Its all working perfectly for glass fish, does anyone else have such a problem?

Hooray! Nfv

+7
source share
1 answer

You need validation-api.jar . It contains a Bean validation API, including bootstrap classes (javax.validation.Validation).

You may have downloaded free JAR files instead of the distribution . You can download the latest version 4.3.0 as a zip here . It contains all the files that need to be added to /WEB-INF/lib . After extracting the zip, you can find validation-api.jar in the /lib/required folder.

+7
source

All Articles