java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
Solution 1:
The javax.servlet.jsp.tagext.TagLibraryValidator class is introduced in JSP 2.0. This error can thus have the following possible causes:
You are not running a JSP 2.0 compatible serlvetcontainer. For example, Tomcat 4.x or 5.0. You need at least Tomcat 5.5 or better, 6.0, or even better, 7.0. Just the latest version.
You have cluttered the
/WEB-INF/lib
with arbitrarily downloadedjsp-api.jar
orj2ee.jar
files or whatever contains the JSP API, which originates from a completely different servletcontainer make/version which in turn was actually not JSP 2.0 compliant. Get rid of those libraries. You don't need them. If you did this to workaround compilation errors, then you did it the wrong way. They should end up in compiletime classpath, not in the runtime classpath. See also How do I import the javax.servlet API in my Eclipse project?
Solution 2:
I had a similar problem, I am using Tomcat 10. I was getting this error using Apache NetBeans 12.3 IDE.
I added the following libraries:
- jakarta.servlet.jsp.jstl-api-2.0.0.jar
- jakarta.servlet.jsp.jstl-2.0.0 (1).jar
My code is running fine now. link to see where I added them