jspjstl

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator


I followed the guide in this link to install JSTL but I got the following error when I tried to launch my JSP page:

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

The taglib declaration is:

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

I installed JSTL 1.1 under /WEB-INF/lib in Tomcat webapps and tried to do the same in my project, but it didn't work. I also tried version 1.2 of JSTL and still the same message. How is this caused and how can I solve it?


Solution

  • The javax.servlet.jsp.tagext.TagLibraryValidator class is introduced in JSP 2.0 and then later repackaged to jakarta.servlet.jsp.tagext.TagLibraryValidator in JSP 3.0. This error can thus have the following possible causes:

    See also: