Search code examples
tomcattomcat6java-ee-6bean-validation

Adding javax.validation capabilities to Tomcat


I'm trying to run a web application using Tomcat but the the application is using libraries such as:

import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

These libraries are not part of the Tomcat spec so I need to add them manually.

What libraries should I add?


Solution

  • The javax.validation package is a Bean Validation (JSR-303) library.

    An implementation of this specification is i.e. the Hibernate Validator or the Apache Bean Validation.