How to install and use CDI on Tomcat?

Tomcat as being a barebones JSP/Servlet container doesn’t support CDI out the box. It is not correct to drop jakartaee-api.jar or javaee-api.jar in /WEB-INF/lib just to get your code to compile. The JEE API JAR contains solely the API classes, not the concrete implementation. Get rid of the whole JAR. It can cause many other … Read more