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

I am newly implemented JSTL In my web app and when I deploy I got the below exception.

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?

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 downloaded jsp-api.jar or j2ee.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.